I'm using a child of the twentyten default theme and I want to hide the sidebar on some pages.

What is the solution for that?


Actually, Twentyten has a no-sidebar page template already.


Modify the template option in the page edit screen:

Template Option

And viola:


| improve this answer | |
  • John, how can I increase the page width only for this specific page? – a3mlord Nov 20 '16 at 16:24

create a new page template, simply duplicate the current page.php or index.php. remove the following:

<?php get_sidebar();?>

and place a template title at the top of the file

Template: No-Sidebar Template

Then you can choose that when publishing.

NOTE: This will probably impact on your styles, may need to tweak your stylesheets.

| improve this answer | |

You can use conditional template tags on your standard page file template

if( ! is_page('page_name')){ get_sidebar();}


if( ! is_page(page_id) ){ get_sidebar();}

You can also pass an array

is_page(array(42,'about-me','About Me And Joe')) 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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