How To Hide Sidebar On Home Page In WordPress?

Posted by

Hi,

Many wordpress blog user wants to hide the sidebar on their home however it is a very good element of the blog. Here I have described the process on how to hide sidebar on wordpress blog:

1. Open Index.php file of your theme.
2. Find this code:

<?php get_sidebar(); ?>

3. Replace with this code:

<?php if (!is_front_page()) {
get_sidebar();
} ?>
3. Save the file.

That’s it!

Thanks,

Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.