Sometimes you just want to remove sidebar from WordPress theme you are using. Maybe you want to remove sidebar from entire site or only from individual posts or pages.
No matter for which reason you find sidebar an obstacle, there is always way to shape your website per your wishes.
A sidebar area is where you put your site widgets. Most people use it on the right side but it can also be placed on the left or below the content area.
Most free and premium WordPress themes come with multiple sidebars or widget ready areas. Sidebars are useful and can help grow your business.
A sidebar can provide info about the website, contact form, related content, advertisements, email list signup forms, social media profiles, etc. The are many possibilities.
The purpose of sidebars in WordPress is to display items that are not part of the post or page content. Items can be easily added to the sidebar of a theme using WordPress widgets.
In most WordPress themes, sidebar will appear differently when a visitor is viewing site from a mobile device.
Due to reduced width of the screen size, sidebars that appear on right or left on the desktop are moved to the bottom on mobile screens.
As useful as a sidebar can be, having one isn’t always necessary. There are times when website owners find them to be more distraction than beneficial tool.
Sometimes you’ll find that either an entire site, or just a specific page is better off with a single column. With that in mind, in this post I will discuss modifying your WordPress theme to eliminate the sidebar.
Remove Sidebar WordPress Methods
Why would you want to delete WordPress sidebar? If you would like that your site visitors have distraction free reading of your blog content, you might want to remove sidebar. Maybe sidebar doesnt appear as it should on mobile devices. No matter what the reason, it has to go.
Most themes have option to choose not to display sidebar or to restrict display of sidebar to certain pages or posts. You can also contact theme author and it can tell you steps needed to remove sidebar from WordPress.
But if you can’t get in touch with support and your theme doesn’t have option to remove sidebar, then follow one of methods mentioned below depending on what you want to do with sidebar.
The first thing to consider is where exactly you want to remove the sidebar from. From a specific page template? From the whole site? Static pages only?
#1. HOW TO REMOVE WORDPRESS SIDEBAR FROM EVERYWHERE IN WORDPRESS THEME?
Do you wish to remove sidebar from every page and post of your WordPress website? In order to do this, you’ll have to edit WordPress theme files.
Go to /wp-content/themes/your-theme-name/ folder using FTP (for example FileZilla) or cPanel (if your hosting uses it). You can also edit theme files by going to Appearance – > Editor in your site dashboard.
WordPress theme files consist of templates. You need to edit all the templates which display the sidebar you wish to remove. You’ll need to edit index.php, archive.php, page.php, single.php, home.php and any other if they display sidebar.
You should be looking into your template file for a line which looks something like this:
<?php get_sidebar(); ?>
Example of index.php in Twenty Seventeen theme
This code is what WordPress uses to add the sidebar to the specific page. Remove that line, and you will remove the sidebar.
If your theme comes with multiple sidebars, then you will see different instances of this code with a sidebar name inside the function. For example:
Delete the line that represents the sidebar that you don’t want to display.
You may notice that while sidebars are gone, your content area is still appearing with the same width leaving the sidebar area empty.
Your sidebar may be gone, but odds are you still aren’t using the full width of your page.
Instead, your content is probably the same size as it was, only now it’s sitting next to a empty space where your sidebar used to be.
That’s because the width of your content area is controlled by your theme’s stylesheet. Please check instructions further below to see how to fix this.
#2. HOW TO REMOVE SIDEBAR FROM INDIVIDUAL PAGES IN WORDPRESS?
What if you want to remove sidebar from individual pages in WordPress but allow it to display on other sections of your website? Most WordPress themes come with ready to use, full width templates. These templates can be used on any of your pages.
Go to page where you want to remove sidebar and select the Full Width template under ‘Page Attributes’ meta box to remove sidebar for that particular page.
But what if your WordPress theme doesnt have a full width template? Then there will not be ‘Full Width’ option in the template as shown in picture above.
You’ll have to create a full width template manually. Open a plain text editor like Notepad and paste the following code in a blank file:
Template Name: Full Width
Save this file as full-width.php on your desktop. Then you need to open file called page.php from your theme files and copy everything that appears after
<?php get_header(); ?> line.
Paste that code in your full-width.php file after get_header part. After that you need to locate and delete the line that looks like this:
<?php get_sidebar(); ?>
If your theme doesn’t display sidebars on pages, then the code will not be in file. Save your changes and upload the full-width.php file to your current theme folder using FTP or cPanel.
You can now edit any page on your WordPress site and you will be able to select your full width page template. If you page didn’t had Template under Page Attibutes, it will have now.
Be noted that all changes made to parent theme may dissapear once theme gets updated. Always use child theme for any customization.
#3. HOW TO REMOVE WORDPRESS SIDEBAR FROM BLOG POSTS PAGE?
Most WordPress themes display sidebars on the blog post page. Apart from a static front page, WordPress allows you to use a separate page for your blog posts.
What if you don’t want to display sidebar on your blog posts page? WordPress allows you to use a static front page and a separate page for your blog posts.
If you don’t want to display sidebars on the blog posts page, then you need to go to Settings » Reading page. Notice the name of the page you are using as your blog posts page.
Now go to Pages » All Pages and edit the page used to display your blog posts. Under the page attribute section select a full width template and then save your changes.
If you don’t see a full width template option, then you will have to manually create a full width template. See the previous section in this article for detailed instructions.
#4. WORDPRESS DISABLE SIDEBAR ON SPECIFIC POSTS
If you want to remove sidebar on certain posts, you can use a Display Widgets SEO Plus plugin.
This plugin has option to hide widgets and thus sidebar for particular posts. You just need to input your post ID from post on which you want to hide sidebar and it will be removed from that post.
Post will become full width without need to adjust anything additionaly. See more details below how plugin works.
Remove Sidebar WordPress Method Using Plugin
You can hide or show sidebar on whole site, particular categories, selected content types and custom post types, certain static pages, custom post type archives, custom taxonomy archives, particular posts using Display Widgets SEO Plus plugin.
When the Display Widgets SEO Plus plugin is active, it’s possible using dropdown selections and tick boxes (added to the bottom of widgets under “Appearance” > “Widgets”) to show or hide a widget.
Plugin works with custom taxonomies, custom post types, custom post type archives and the WPML language plugin, bbPress and BuddyPress.
For example, using this plugin you can set that widget should only load on the posts of a specific category and on a few select static pages, on the 404 error page and on the home page.
After installing and activating plugin you will see new options under each widget in sidebar under Appearance -> Widgets.
Set to hide for each widget in sidebar per your needs and sidebar will be gone. In most cases page will not leave empty space where sidebar was. It will strecth as full width.
I REMOVED SIDEBAR BUT STILL HAVE EMPTY SPACE WHERE SIDEBAR WAS
Sometimes you will need to make some additions to the stylesheet in order to change your site to full width. If you are completely eliminating the sidebar from your entire site, you can just edit your existing styles.
But if some pages will still display a sidebar you’ll want to keep the current styles in place, and just add new ones to increase the width when needed.
Use Inspect tool (right mouse click and choose Inspect on page you want to check) to identify the styles that need to be adjusted. You’ll want to find the width of the entire layout, so you need to identify that container.
You can also CSS plugin like CSS Hero, Microthemer, Elementor or any other CSS edit tool to remove sidebar from your WordPress site or edit stylsheet after removing sidebar.
You can also use page builder plugin. Most page builder plugins like Visual Composer have option to set page or post per your needs.
Remove Sidebar In WordPress Site Summary
If you are beginner to WordPress you might find above methods and steps daunting.
Though most methods are easy (depending from where you want to remove sidebar), always contact support or theme author to help you if possible and be sure to make backup of your site.
Theme support will be able to provide you steps and code which you need to apply in order to hide sidebar in your WordPress website.
I hope above methods helped and you managed to remove sidebar. You can also always try making CSS changes using free CSS editor plugin like Elementor or paid like Microthemer or CSS Hero.
If you have any other tips or methods on how to remove sidebar from whole site, custom post types or particular post or page let me know in comments below.
DISCLOSURE: My posts may contain affiliate links. If you buy something through one of those links, I might get a small commission, without any extra cost to you. Read more about it here.