• Is it possible somehow to disable sidebars on a particular page. I only want this on one page, where I run my simple:press forum.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is it possible somehow to disable sidebars on a particular page

    yes. you have to find the template page from which you are calling simple:press – most likely page.php, unless you have created a custom page template.

    within that file, find the line that calls the sidebar, it will possibly be like this: <?php get_sidebar(); ?>

    wrap it in an if statement

    <?php if(!is_page('forum')) {
             get_sidebar();
          }
    ?>

    instead of the word forum in my example, use the page slug (URL) of the page from which you are calling simple:press

    this code will load the sidebar on all pages except the forum page

    Thanks for this post. It worked for me. I was able remove the side bar on my about page. I want to also remove the side bar on my links page. How do I put more than one page in this if statement?

    <?php if( !is_page('About') && !is_page('Links') ) {
             get_sidebar();
          }
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable sidebar in a particular page’ is closed to new replies.