Support » Themes and Templates » using page template to theme photoblog section of site

  • Hi. I have a “regular” wordpress blog but I’m trying to add a photoblog section to it that uses a different WP theme, one specifically for photoblogs. There might be a simpler way, but I was thinking I could add a page template for the photoblog section. In the page template file (which is basically the photoblog theme’s index.php file), is there a way to call the photoblog theme’s header and footer instead of the main site’s header and footer? Could I use

    <?php get_header(2); ?>

    and name the file header2.php or something like that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Not really. get_header is a function defined in the core WP files, so it will not “listen” to any other thing you add to it 🙂

    If you have another header file (give it a different name!) in the theme directory, then you can call it by:
    <?php include (TEMPLATEPATH . '/newheader.php'); ?>
    Don’t change anything in this code, except your file’s name!

    Thanks so much. I’ve spent the whole evening working on this and I’m close. Now I’m hung up on trying to adapt the following using your code above:

    <?php wp_get_archives(‘type=monthly&format=link’);

    I’ve tried

    <?php include (TEMPLATEPATH . ‘/parchives.php’, ‘type=monthly&format=link’); ?>

    but I get php errors. If I leave out the bit on the monthly format, I get a message telling me I have a mysql error. Do you have any further ideas?


    <?php include (TEMPLATEPATH . '/parchives.php', 'type=monthly&format=link'); ?> <– this one will not work, for sure.
    The code I gave you is ONLY for including a different header in a WP template file. That’s what you were asking for. Not including the Page template in something else!
    For displaying the archives in the way you want you should have the template tag in the template file.
    But I am not a photoblog person, so I don’t know how that photoblog stuff interacts with WP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘using page template to theme photoblog section of site’ is closed to new replies.