How to Hide the Sidebar on Your WordPress Home Page
As you probably have noticed that most WordPress blogs have the same sidebar on all blog pages. While sidebar is important, sometimes it is not necessary for the homepage. In this article, we will share how you can hide the sidebar on your WordPress homepage.
One of the ways to do is by creating a completely new custom homepage for your WordPress blog, or you can simply make the change by using the code from this tutorial.
First open your index.php and locate the following code:
<?php get_sidebar(); ?>
Then Replace the code with:
<?php if (!is_front_page()) {
get_sidebar();
} ?>
And thats it. Now your Front Page will not have the sidebar.
Comments
4 Responses to “How to Hide the Sidebar on Your WordPress Home Page”Share Your Opinions
Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!
Please make sure that you have read our Comment Policy.










Your instructions are a timely find. I just set up a static homepage and figured out how to remove the first code (and things looked right).
Now I have pasted in the replacement code. I’m not a coder, but I bet doing that will avoid problems down the road.
I shared this fix with my fellow PrimePress theme users at our support forum.
thanks for the tip
going to try this now
thanks for the tip..
Great tip dude! Thanks