• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

Unique Header Images for Second Level Pages

I would like to have unique header images on my second level pages.  I am currently utilizing a plugin that rotates images for my front page (Cimy Header Image Rotator), but I want a static image for the other pages that is unique to the page topic. I am using the twenty-twelve theme as my base with a child-theme. What is the best way to go about this.
1 Solution
Jason C. LevineNo oneCommented:
Use the function is_single() to control the output on any given page...

if is_single('XX') { // Where XX = page ID

do something different with the header


Open in new window

Official Documentation: http://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page

So depending on where the header images live, you edit that template file and add the necessary logic.
The easiest way to do this is to change the header to look for

Open in new window

and then add the thumbnail option to each page using
add_theme_support('post-thumbnails', array('page'));  

Open in new window

within your functions file.

This will allow you to use the thumbnail picker as you would on a post page to choose the image you wish to use for that page.

Please bare in mind I am giving you the method, I am not familiar with hacking the twenty twelve theme so would advise you create your own banner setup to do this as it would be much cleaner.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now