Forums

Get rid of sidebar on one page (2 posts)

  1. billselak
    Member
    Posted 2 years ago #

    I want to get rid of the sidebar on one specific page:
    http://www.billselak.com/forum

    I know how to add a sidebar using <?php get_sidebar(); ?>, but I don't know how to not show the sidebar.

  2. billselak
    Member
    Posted 2 years ago #

    ok, I figured it out. So, if anyone else is trying to do this, here's my solution:
    On page.php, I changed:
    <?php get_sidebar();; ?>
    to:
    <?php if(!is_page('Forum')) get_sidebar();; ?>

    Then, there was a blank space (where the sidebar used to be). I created a div titled widecolumn with a width of 100%. Then, on page.php, I changed the original div (contentleft) to:
    <?php if(!is_page('Forum')) { ?>
    <div id="contentleft">
    <?php } else { ?>
    <div id="widecolumn">
    <?php } ?>

    Yay!

Topic Closed

This topic has been closed to new replies.

About this Topic