Support » Plugins and Hacks » [Resolved] How can I use an alternative header.php

[Resolved] How can I use an alternative header.php

  • Hello WordPress people!

    I want to use a different header.php for some pages. Both structure and content need to be slightly different, including the header image dimensions.

    Where do I look to start learning how to do this?

    For my next trick I want to learn how to swap out different sidebar content for different sections. Right now the header is the biggest issue.

    I’m using WP as part CMS, part blog.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Maybe look sometime to Docs/Codex and save yourself time…

    Anyway, this is the solution

    <?php include (TEMPLATEPATH . ‘/header2.php’); ?>

    for sidebar use the same principle

    I’ve tried searching the documentation for [alternative header] and TEMPLATEPATH and whatever else I could think of. Is there a specific place in the codex where I should look?

    Here’s a little more info – hope this helps! I am already using an alternative header.php for my home page via something like <?php include (TEMPLATEPATH . '/header2.php'); ?>. I want to know how to do the same for some of the blog categories, and also some of the “static” wp pages. I don’t know enough php to be able to find where to associate a “topicheader.php” with all the posts in a specific category, or a “page2header.php” with a specific page.

    Could someone please point me towards what would do this, or supply a search term that I could use to find it on my own? “Read the codex” or “read about templates” is not specific enough to stick to my 99% php-illiterate brain.

    Look what I found! I was Googling around for something else WordPress and found a link to this: different CSS for different categories.

    Color me (nerd) happy.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How can I use an alternative header.php’ is closed to new replies.