Featured Image Before Single Page Entry Title in Genesis

This code adds the featured image before the entry title on single pages only.

The image is only added if a featured image is set using the Featured Image meta box native to WordPress.

If no featured image is set, no image is added before the title on single pages.

If you want to add the featured image before the title on single posts, use this code.

To add the featured image on single pages & single posts, change :

is_singular( 'page' )

to

is_singular(array( 'page', 'post' ) )

Note the addition of the array function and extra opening and closing round brackets.

Image Position

Change the genesis_entry_header hook to change the position the featured image is loaded on the single page.

Tested using the Magazine Pro child theme by StudioPress based on the following question from a registered user :

I am working with the Magazine pro child theme. I want to show the featured image on pages, but only if the featured image is added. I don’t want it to show a random thumbnail in the content.

Related Tutorials

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.