• Hi all,

    I have been working on an issue for couple of days now and read many posts but no luck ??

    I want to have 1 of my pages different than others. to be exact, page#2. in that page, my template will be a bit different like no sidebar, different formatting, etc…

    my research led me to this:

    on page.php i only put:

    <?php if (is_page(‘2’)) {
    include(TEMPLATEPATH . ‘/page-full.php’);
    } else {
    include(TEMPLATEPATH . ‘/page.php’);
    }
    ?>

    then i created page-full.php with few changes i mentioned above.

    well, i doesn’t work. any idea?

    much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can choose a custom template for pages when your creating a page, say you want to use a custom template for your ‘about’ page, just create a normal page called ‘about’ and you will see amongst the options for that page a drop down box for Template, click and choose the custom page template you want to use.

    To make your custom template show in the drop down box so you can select it put this code at the top of your page-full.php:

    <?php
    /*
    Template Name: Page Full
    */
    ?>

    The custom page can be styled as you like so removing the sidebar and changing the layout if fine.

    I hope this helps

    Thread Starter capefarvel

    (@capefarvel)

    noonoo,

    thanks a bunch! worked like a champ.

    take care ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘conditional page’ is closed to new replies.