WordPress- how to hide sidebar in front page
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.
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.