• I want to use different page templates for some pages different than on my static home page. I tried creating a new index2.php as a new page template that called different parts of the page – like header.php, sidebar2.php (Which I created) and footer.php etc. but it seemed to default back to the orginal index.php

    Any idea what might be causing this?

Viewing 8 replies - 1 through 8 (of 8 total)
  • index2.php for sure cannot be a Page template. See the Codex about Pages and Page Templates:
    http://codex.ww.wp.xz.cn/Pages#Page_Templates

    Thread Starter qdsouza

    (@qdsouza)

    Actually the template is page2.php.

    I wanted to use the example because the index.php calls the header, sidebar, and footer phps which are seperate in the semiologic theme. When I use page2.php as a page template I want to use some of the same footer and header pages but a different sidebar template.

    Then instead of get_sidebar function use a regular
    include sidebar2.php code and you are done.

    Thread Starter qdsouza

    (@qdsouza)

    But I am using this:
    <?php require_once(TEMPLATEPATH . ‘/sidebar2.php’); ?>

    in my footer2.php file.

    My page2.php contains:

    <?php
    require_once dirname(__FILE__) . ‘/install.php’;

    require_once(TEMPLATEPATH . ‘/header.php’);

    if ( function_exists(‘sem_display_posts’) )
    sem_display_posts();

    require_once(TEMPLATEPATH . ‘/footer2.php’);
    ?>

    Yup, that’s the way to do it. Don’t forget to assign a name to the template as described in the codex and to select it to your static page.

    Thread Starter qdsouza

    (@qdsouza)

    Ah-hah – found the issue.

    Actually the problem is that I am trying to use a different page template with the static home page plugin, on my home page. The different page template doesn’t seem to work there.

    Is there a work around?

    yeah. rename your template home.php

    Thread Starter qdsouza

    (@qdsouza)

    You are AWESOME!

    I should have known – ‘home’ slug home.php

    Thanks so much

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Page Templates Using Semiologic’ is closed to new replies.