Last active
August 29, 2015 14:13
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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