WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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


Modify the template option in the page edit screen:

Template Option

And viola:


share|improve this answer

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.

share|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')) 
share|improve this answer

Your Answer


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.