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?

3 Answers 3


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


Modify the template option in the page edit screen:

Template Option

And viola:


  • John, how can I increase the page width only for this specific page?
    – a3mlord
    Nov 20, 2016 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.


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')) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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