How to Remove Sidebar From Homepage – Beginners Guide

Hi WP learners, in this article, I will walk you through how to remove sidebar from the homepage. There are many probable methods to remove sidebar from the website but today I will try to show you the ways to do that. So, without farther ado let’s get started.

How to Remove Sidebar From Homepage Featured Image

How to Remove Sidebar From Homepage

First, open your index.php and locate the following code:

First, you need to visit Appearance >> Editor here you can see all the pars of your WordPress theme

<?php get_sidebar(); ?>

Then Replace the code with:

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

 

And that’s it. Now your FrontPage will not have the sidebar anymore.

You can also try this by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin -> Appearance -> Customize -> Additional CSS

/*remove sidebar from home and full width*/
.home div#secondary {
display: none;
}
.home div#primary{
width:100%

}
.home .post-featured-image{
width: 100%;
max-width:100%;
}

 

You may want to see how to create a website using WordPress step By step for beginners.

 

I hope you learned how to remove sidebar from the homepage. If this article helps you make sure you subscribe to Lets Learn Now YouTube channel to get more WordPress videos and trips in order to manage your WordPress sites. If you want to see our social portfolio find us on Twitter and Facebook.

 

Summary
Review Date
Reviewed Item
How to Remove Sidebar From Homepage
Author Rating
51star1star1star1star1star
LLN Team

About The Author : LLN Team

We are LLN Team promise you to provide you useful information about website and blog creation. We will focus on WordPress and other essential needs. Keep browsing Lets Learn Now. Cheers

Leave a Reply

Your email address will not be published.

Please post a relevant comment and make the conversion informative.