How can I add a featured image to a page?

Eek! A 33% acceptance rate isn’t really going to do you any favours but lucky for you WordPress’ in-built post-thumbnail featured image functionality works for posts, custom post types and pages too.

Add the following line into your theme functions.php file:

add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );

Then in your page.php file and I stress that this must be used within the page loop (not outside of it) the following function will show your featured image on a page if it has one assigned to it.

the_post_thumbnail()

Adding a featured image to a page is the same process as adding one to a post. On the page editing screen you will see a metabox with a link that says, ‘Set a featured image‘ click that and you’re good to go. No plugins required.

Leave a Comment

error code: 523