Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

If I wanted to remove 1 or more sidebars when a certain page is called what is the best way to go about doing that?

share|improve this question
    
make sure to have a specific css class for the pages without sidebar - for instance by using body_class() - this will give you the ability to target the styles of the central content div to stretch the remaining space to fill the full width. –  Michael Jul 12 '11 at 12:37
1  
8 questions asked, 0 accepted answers? –  Chip Bennett Aug 11 '11 at 16:58
add comment

3 Answers

If you are creating your own theme you could add this to your page.php template file

if(!is_page('999')) { //Page to exclude sidebar from
    dynamic_sidebar('sidebarID'); 
}

Replace 999 with the page ID you wish to exclude, and sidebarID with the sidebar you want to show.

share|improve this answer
add comment

Copy page.php from your theme and rename to create your custom template. associate this template with page you want from admin->pages->edit page -> select template.

In your template you can remove side bar as you want...

Here is more info about page templates http://codex.wordpress.org/Pages#Page_Templates

share|improve this answer
add comment

You would want to create a template for your page. In this template you would call your content but not the sidebar. Then you would assign this template to the pages you want in the editor.

Here's a simple tutorial : http://www.expand2web.com/blog/custom-page-template-wordpress/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.