How to show featured image below entry content on single posts in Genesis

Want to add featured image below content on single post pages in Genesis?

Create a file named single-post.php in your child theme directory having the following code:

add_action( 'genesis_before_entry_content', 'custom_featured_image' );
/**
 * Show featured image (if present) before content on single posts.
 */
function custom_featured_image() {
    // if there is no featured image, abort.
    if ( ! has_post_thumbnail() ) {
        return;
    }

    printf( '<figure><img src="%s" alt="%s" /></figure>', genesis_get_image( 'format=url&size=medium_large' ), the_title_attribute( 'echo=0' ) );
}

genesis();
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.