Instantly share code, notes, and snippets.

Embed
What would you like to do?
CoachingPro theme setup modification -- disable first image as Featured Image
<?php
// Copy/Paste this code to overwrite the current code, starting at Line 220 of /coaching-pro/lib/theme-setup.php
add_action( 'genesis_entry_header', 'coaching_pro_show_featured_post_image', 1 );
function coaching_pro_show_featured_post_image() {
// only show on single posts and pages
if ( ! is_single() && ! is_page() || ! has_post_thumbnail() ) {
return;
}
if ( $image = genesis_get_image( 'format=url&size=featured-image' ) ) {
printf( '<img class="post-photo aligncenter" src="%s" alt="%s" />', $image, the_title_attribute( 'echo=0' ) );
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment