Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created March 24, 2014 13:46
Show Gist options
  • Save WebEndevSnippets/9740354 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/9740354 to your computer and use it in GitHub Desktop.
Genesis: Display featured image on pages after title
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