How to Remove Sidebar in WordPress for a Specific Page

by Taswir Haider in Wordpress

We all know how much important the Sidebar is for any blog. Majority of the visible monetization comes through sidebar including Adsense, Advertising and Affiliate marketing. But for few specific pages, you would like to remove sidebar to make it clean and focus more on the content. Such example we notice in About me, Contact, Privacy policy, Advertisement, Submit guest post- these type of pages.

Remove Sidebar for Specific Page in WordPress

I believe all the expert WordPress users already know how to remove sidebar for specific page. The process is quite simple though. If you are new to WordPress and wondering how to do that, you might laugh at yourself later for not noticing it!

First open your target page or Add a new page. On the right side, from “Page attribute” tab, change the default template to “No Sidebars” and update it. That’s it. Too simple huh?

How to Remove Sidebar in WordPress for a Specific Page

Hide Sidebar from WordPress Homepage

If you would like to hide sidebar from Homepage, you can also do it.

Open Index.php file for your theme and find out the following code:

<?php get_sidebar(); ?>

Now replace the code with the following lines:

<?php if (!is_front_page()) {
} ?>

That’s it! From now on sidebar will not be shown on your homepage.

Subscribe to RSS, Get Free Updates!

Previous post:

Next post: