Skip to content

Instantly share code, notes, and snippets.

@gspice
Last active August 29, 2015 14:13
Show Gist options
  • Save gspice/7477aa26cccf637d572c to your computer and use it in GitHub Desktop.
Save gspice/7477aa26cccf637d572c to your computer and use it in GitHub Desktop.
Genesis Agent Profiles adds featured image to content already, so then the theme adds it as well. Exclude by adding the CPT to the existing conditional in WAP's functions.php
// 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() || is_singular( 'aeprofiles' ) ) { //or use wap-community
return;
}
echo '<div class="featured-image">';
echo get_the_post_thumbnail( $thumbnail->ID, 'feature-wide' );
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment