WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need the ability to add an image to a page, like a featured image. How can I do that, and how do I get the featured image to display in page.php? It can be a plugin if what I am asking can't be done within Wordpress itself out of the box.

share|improve this question
custom fields? codex.wordpress.org/Custom_Fields – Alexey Jan 30 '12 at 6:56
up vote 3 down vote accepted

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.


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.

share|improve this answer
All you need to add is add_theme_support( 'post-thumbnails' ); and this will also work for pages – stemie Sep 29 '14 at 6:29
Remember to toggle "featured image" in screen options afterwards. – Mattias Apr 11 '15 at 7:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.