Home › Forums › Winning Agent Pro Theme › Not show Featured Image on top on Pages. › Reply To: Not show Featured Image on top on Pages.
March 21, 2014 at 9:46 am #2680
Member
Hiya,
Look for this in your functions.php file:
// Add featured image above single posts.
add_action( 'genesis_before_entry_content', 'wap_featured_image' );
function wap_featured_image() {
// Return early if not a singular or does not have thumbnail
if ( ! is_singular() || ! has_post_thumbnail() ) {
return;
}
echo '<div class="featured-image">';
echo get_the_post_thumbnail( $thumbnail->ID, 'feature-wide' );
echo '</div>';
}
That’s the code that’s bringing in your featured image. You’ll need to change the conditional statement to exclude pages. I’ll tell you the answer, but if you’d also like to know the reason behind it, here’s a tutorial on using WordPress conditionals. 🙂
Change is_singular()
to is_single()
and that should do the trick.
Cheers,
Carrie