WordPress.org

Ready to get started?Download WordPress

Forums

Different layout for some pages (3 posts)

  1. d135-1r43
    Member
    Posted 6 years ago #

    I want to display some pages of my blog in a complete different layout. But if I create a different page template within my theme, the get_header(), get_sidebar() and get_footer() only embed my deafult theme's files (header.php, sidebar.php, footer.php). How can I change it to make e.g. get_sidebar() embed the file sidebar2.php?

  2. wp_guy
    Member
    Posted 6 years ago #

    You can do something like:

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

    More info: Including Any Template

  3. MichaelH
    Member
    Posted 6 years ago #

    Take a look at the Codex article, Include Tags, The Sidebar Template.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.