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.
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.
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();
}
?>This topic has been closed to new replies.