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.
Nice and simple hack! Saved me some other theme modification that i feared would mess up things :)
- spam
- offensive
- disagree
- off topic
Like