Forums

Get rid of sidebar on ONE page only?? (6 posts)

  1. itzsnider
    Member
    Posted 5 years ago #

    Is this possible? I want http://www.sniderz.com/smf to show only the forums, so minus the sidebars. Is there anyway for JUST this page to have the header and footer only?

  2. Samuel B
    moderator
    Posted 5 years ago #

  3. crazypaws
    Member
    Posted 5 years ago #

    I agree with Sam's redirect to your other request. It's great you figured out that problem but not adding the solution to your post leaves a useless page. Kindly add it so the next person searching for something like that doesn't have to stumble through an even longer list of incomplete help requests before finding an answer to their question.

    As for this question - certainly possible. solution is to look through your theme files and see which ones call for the sidebar (page.php? header.php? etc). You'd then make a similar file that doesn't call for it and use that in a template for the page you are a creating.

    Specifically, where the sidebar call is depends on what theme your using. different themes may place the sidebar call in different places.

    As an example - if the theme has the sidebar call in the header.php file. One solution to creating a page without the sidebar is to create a second file called header2.php that is identical to header.php except you've commented out (or deleted) the sidebar call (Get Sidebar line). Next make a page template that calls header2 instead of header.php and use that page template for creating the page.

    you can also add a few lines of CSS to your stylesheet or style.php to give pages using header2 a different look.

    there's lots of detail on how to do all of this in the codex.

  4. doodlebee
    Member
    Posted 5 years ago #

    also agreeing with smaboll.

    And alternatively, you can use conditionals to display your sidebar. It's a lot easier that creating an alternate stylesheet or a new template.

  5. RandyGall
    Member
    Posted 4 years ago #

    I was able to acomplish this fairly easy, I found which template page contained the

    <?php get_sidebar(); ?>

    and changed it to

    <?php if (is_page('208')) : ?>
    <?php else : ?>
    <?php get_sidebar(); ?>
    <?php endif; ?>

    and 'it seems' to be working correctly. In this case page 208 being what I didn't want to have the sidebar on.

  6. TH
    Member
    Posted 4 years ago #

    Yesss! After reading maybe 50 posts, this is the one which helped me! Thank you!!!

    My page happened to be 208 too so I didn't even have to change that. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.