Skip to content

Instantly share code, notes, and snippets.

@arkadiusjonczek
Created November 12, 2015 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arkadiusjonczek/2524c659936e58f457bf to your computer and use it in GitHub Desktop.
Save arkadiusjonczek/2524c659936e58f457bf to your computer and use it in GitHub Desktop.
Genesis show featured image in single post
add_action( 'genesis_entry_content', 'single_post_featured_image', 1 );
function single_post_featured_image() {
if ( ! is_singular( 'post' ) )
return;
$img = genesis_get_image( array(
'format' => 'html',
'size' => genesis_get_option( 'image_size' ),
'attr' => array( 'class' => 'post-image' ) ) );
echo $img;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment