WordPress- how to hide sidebar in front page

wordpress logo

Screen Shot 2015-05-16 at 10.49.58 AMWhile 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.

 

you can simply make the change by using the Theme file editor  below

First  Click Appearence ->Editor ,

then open your index.php (Main Index Template) 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.

Screen Shot 2015-05-16 at 10.50.24 AM

It's only fair to share...Tweet about this on TwitterShare on Google+Share on FacebookShare on LinkedInEmail this to someone
Twitter Auto Publish Powered By : XYZScripts.com