• The title says it all how would I create a page (not a post) in wordpress to have it so the sidebar would not show up, the iframe im using needs all the space it can get.

Viewing 5 replies - 1 through 5 (of 5 total)
  • http://codex.wordpress.org/Conditional_Tags

    check out is_page() on that link… surround the sidebar template tag in your theme’s page.php with a conditional like:

    <?php if (!is_page(‘ID’)) get_sidebar(); ?>

    where ID is the page ID number you want to nuke the sidebar on.

    Depending on your theme, you might also want to change the width of your main content div. For most themes that’s called ‘content’ in the same page.php file…

    <?php
    if (is_page(‘ID’)) $contentclass = ‘superwide’;
    else $contentclass = ‘normal’;
    ?>
    <div id=”content” class=”<?php echo $contentclass; ?”>

    your milage may vary, but the same idea applies.

    Thread Starter mattc908

    (@mattc908)

    <?php if (!is_page(‘ID’)) get_sidebar(); ?> so that doesnt seem to turn off the sidebar for my page.

    did you actually read what I wrote? – you have to change the “ID” to the ID number of your page.

    Thread Starter mattc908

    (@mattc908)

    Yes I changed the id to the page ID

    well I’m not sure why, in that case.

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

The topic ‘Page without Sidebar’ is closed to new replies.