WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

What's the best practice when it comes to removing the sidebar on the wordpress homepage? I'm using wp Version 3.2.1 and Skeleton Child Theme 1.6

share|improve this question

closed as not a real question by toscho Jul 19 '12 at 23:54

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

This very much depends on the theme you are using, but here is how you would go about it.

Locate where the sidebar div is being added. Then wrap the sidebar in a !is_home() check then it will only load on pages that are not home.

You will probably also need to add a class using the same logic so you can also tweak the widths with css. If you hide the sidebar, the content area will need to be set to 100% for example.

Is this the skeleton theme you are using?


If not, please send a link to the one you are using and I can help a little more :)

share|improve this answer
Be very careful. Do you mean the Site Front Page (i.e. is_front_page(), or the Blog Posts Index (i.e. is_home())? The two are not always the same. – Chip Bennett Nov 3 '11 at 15:30
andy, @chip thanks for the answers, I figured it out eventually: First I set up a regular page as my site home page and then, while editing the front page, I set the template to "designer page - no sidebar or page title" – Bogdan Nov 4 '11 at 20:40
@ChipBennett thanks for clarifying. I should have noted that. Bogdan, glad you got it sorted. I get that you used a page template assigned to the home page. But I didn't get what you meant by " I set the template to "designer page - no sidebar or page title" I assume that is a feature of the template. – Andy James Nov 5 '11 at 11:16

I usually always create a separate page template for my homepage as it is the most unique page of the site and not really like any other page. I create a page called 'Home' in pages, then go to settings > Reading and the first option that says 'Front page displays' I select my home page. Then create a page called 'page-home.php' and remove the function call get_sidebar() from the template, voila.

Much like anything in Wordpress, this is one way of many. The is_home() or is_front_page() functions can also be beneficial, but I find it to be better practice to create a separate template as it works better for me.

share|improve this answer

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