Support » Themes and Templates » Different header on each page or post

  • Hi,

    I´ve been told that a custom header on each page was part of WP.

    WP Save Custom Header
    This plugin is DEPRECATED with WordPress 3.2. Since its functionality is incorporated into WordPress core, this plugin will be no longer supported!

    But how does it work? I cannot find any hint – something like a dropdown menu for the header images.
    I tried to install the WP Display header plugin. But it doesn´t work with my theme. Any idea what I could do??

    Hope anyone can help me!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Have a look at conditional tags for assigning your custom headers to specific pages.

    Thanks, likethegoddess, that sounds good.
    But I don´t know much about PHP programmming…

    Can you tell me, what to insert to make it show a certain header when the condition is true??

    I guess it should be something like that example code:

    ` if ( is_page( ‘About’ ) ) {
    // our about page.
    echo ……;
    } elseif ( is_page( ‘Colophon’ ) ) {
    echo “” . bloginfo( ‘version’ ) . “</p>”;
    } else {

    So, what should I write in my special case after “echo??

    Echo can be very useful. It’s not what you want to use here though, because echo is executed after the page structure has been assembled. You want to intercede when your page.php is adding the header.

    Something like:

    if ( is_page( 'About' ) ) {
    } elseif ( is_page( 'Colophon' ) ) {
    } else {

    You sub that code in for your standard <?php get_header(); ?> tag in page.php and create your custom header file, in this example header-about.php and header-colophon.php.

    While I’m thinking on it, I’ve used this technique with custom sidebars, not yet with custom headers. I expect it’ll work the same way.



    Hey tronicman1,

    WP Save Custom Header adds the posibility to save uploaded header images and make them part of the selection.

    To be able to choose a specific header image for an individual post or page, I created WP Display Header. It adds a meta box to the editor screen where you can choose the image.

    @konstantin Obenland

    Thanks, but I installed it, yet.
    Unfortunately comes the message that it wouldn´t work with my theme (I´ve been asking you some days ago, on your Plugin site).

    What do I have to do to make my theme work with WP Save Custom Header??



    You could upgrade to the latest version of WordPress. Then you don’t need the plugin.

    Your theme has to support the header business though.
    See this post on how to achieve that:

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Different header on each page or post’ is closed to new replies.