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
Leave a Reply
You must be logged in to post a comment.
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
You must be logged in to post a comment.
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?
http://www.simplethemes.com/blog/entry/skeleton-wordpress-theme
If not, please send a link to the one you are using and I can help a little more 🙂
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.