I was attempting to follow the tutorial I found here.

The suggested code snippet below is not working for me:

add_action( 'genesis_entry_header', 'single_post_featured_image', 5 );

function single_post_featured_image() {

if ( ! is_singular( 'post' ) )

$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
printf( '<a href="%s" title="%s">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );


Am I not targeting the right element? And if so, how do I figure how what part of a theme is controlled by what php file so that I know what to write in my functions.php file to make this change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.