Created
November 12, 2015 08:19
-
-
Save arkadiusjonczek/2524c659936e58f457bf to your computer and use it in GitHub Desktop.
Genesis show featured image in single post
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_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