Created
March 24, 2014 13:46
-
-
Save WebEndevSnippets/9740354 to your computer and use it in GitHub Desktop.
Genesis: Display featured image on pages after title
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_action( 'genesis_entry_header', 'we_page_featured_image', 15 ); | |
/** | |
* Display featured image on pages, after title | |
*/ | |
function we_page_featured_image() { | |
if ( ! is_singular( 'page' ) ) | |
return; | |
$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image alignnone' ) ) ); | |
printf( '<div>%s</div>', $img ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment