Whether you use a free theme or indulge in a premium one, chances are your default layout includes a sidebar. Unfortunately, removing the sidebar in WordPress isn’t exactly straightforward.
There are, however, several methods you can use to achieve the look you want for your website. With a little effort, it’s possible to remove the sidebar in WordPress from your entire site or just from specific content.
In this post, we’ll start by discussing why you might be better off without a sidebar on your WordPress site. Then we’ll show you different methods you can use to get rid of yours. Let’s jump right in!
Prefer to watch the video version?
Why You May Want to Remove the Sidebar from Your WordPress Site
Sidebars are extremely common in WordPress design. They’re typically located to either the right or left of the primary page content, although they can also appear at the bottom of the page.
WordPress sidebars usually contain “widgets”, which are small content areas that appear on every page of your website. This makes sidebars a popular place for Calls to Action (CTAs) such as email subscription forms and search bars:
Some sites even use their sidebars to display navigation menus. This can be extremely helpful, since users will always be able to easily find their way around:
Plus, sidebars are popular locations for ads. It’s easy to make a sidebar advertisement highly visible, while still keeping other areas of the page readable:
Considering how handy sidebars can be, it may seem strange that some users would want to get rid of them. However, despite the many types of converting content that you can incorporate into your sidebar widgets, they do have their drawbacks.
Most importantly, anything that lies outside the main content area distracts from your site’s primary purpose. For example, if you have a sidebar on your blog, you may accidentally detract from your posts by placing eye-catching widgets in your sidebar.
On top of that, in some cases, a sidebar can be visual overkill. Content-rich sites such as news aggregates and online magazines can feel cluttered and disorienting when you throw a sidebar into the mix. Removing it, on the other hand, keeps your design clean and easy to understand.
Finally, it’s important to note that sidebars aren’t particularly useful on mobile sites. Most responsive themes move the sidebar to the bottom of the page for users on mobile devices. Since mobile internet usage is on the rise, sticking to a sidebar-dependent design may not be ideal anymore.
How to Remove the Sidebar in WordPress (4 Methods)
Despite the many reasons users may prefer to go without a sidebar on their WordPress sites, most themes still use this feature in their default layouts. Plus, it can be tricky to remove the sidebar if you don’t know what you’re doing. To simplify the process, here are four methods you can use, depending on your situation and preferences.
1. Completely Remove the Sidebar From Your WordPress Site
If you want to do away with your website’s sidebar entirely, you’ll need to edit your theme. Before you get started, it’s highly recommended that you backup your site just in case something goes wrong. You may also want to consider using a child theme, so you won’t be making permanent changes to the theme itself.
Once you’ve protected your site and are ready to start editing, you’ll need to access your theme’s files directly. You can do this via Secure File Transfer Protocol (SFTP) if you like, using an FTP client such as FileZilla. Alternatively, you can also edit files from within your WordPress dashboard.
To use the latter technique, navigate to Appearance > Theme Editor in the back end of your site. You’ll see a warning that looks like this one:
Click on the I Understand button, and remember that you’ll want to be very careful when making changes. Then, you’ll need to find each of your theme’s template files. These are where your theme stores information about how certain types of content – such as posts, pages, and products – should be displayed.
There are likely several templates in your theme. Their names will probably include index.php, single.php, archive.php, and so on. You’ll need to edit each of them, one at a time. Once you’ve opened the first file, look for a line of code similar to this one:
<?php get_sidebar ('sidebar-name'); ?>
Simply delete the code in the parentheses – in this case, “sidebar-name” – to remove the sidebar from that template. Then, repeat this process until you’ve deleted the code across your entire theme.
Unfortunately, after completing this step, your theme will likely leave a large blank space wherever the sidebar was meant to be. This can make your site look awkward and lopsided, like so:
This is because the styling doesn’t specify that the page should use a full-width layout, even though the sidebar is gone. You’ll need to use custom CSS to change the defined width of the content area, a process that will vary from theme to theme. Fortunately, you can usually find instructions on how to do this for popular themes such as Divi and Avada or hire a developer to do that for you.
2. Remove the Sidebar From a WordPress Static Page
In some cases, you may want to use a sidebar in some areas of your site but not others. To remove your sidebar from a single static page – such as your Home, About, or Blog page – you’ll want to start by checking to see if your theme includes a full-width template.
To do this, navigate to the page you want to remove the sidebar from. In the Page Attributes section, look for a full-width option in the Template drop-down menu:
If there’s a full-width template available, simply select it and update the page to remove the sidebar. In the event that your theme doesn’t include this feature, you can create your own template instead.
Start by creating a new file in your preferred text editor, and naming it fullwidth.php or something similar.
Then access your page.php file. Copy all the code from this file and paste it into your new fullwidth.php file. After the opening PHP tag, add the file name like this:
Template Name: Fullwidth
After that, find and remove every instance of the following code:
<? php get_sidebar ('side-name') ?>
Save your changes and then upload your new template to your theme’s or child theme’s folder via FTP. You should now have a full-width template option for your site’s pages.
3. Remove the Sidebar from Single Blog Posts
If you’d like to create single blog posts without sidebars, you’ll first want to check to see if your theme provides a full-width template option, just as you would for pages. Some page builders also provide this feature:
In the event that your theme doesn’t have such a template and you don’t use a page builder, you can still achieve sidebar-less posts by creating your own single post template.
Tired of experiencing issues with your WordPress site? Get the best and fastest hosting support with Kinsta! Check out our plans
This process is very similar to creating a page template. Start by creating a new text file and adding the following code:
<?php /* * Template Name: Featured Article * Template Post Type: post, page, product */ get_header(); ?>
Then, access your theme’s single.php file via FTP or the WordPress Theme Editor. Copy everything below the line that reads get header, and paste it into your new template’s text file.
Now that you have a foundation to work from, you can customize your post template.
Start by removing the sidebar code, just as we’ve done in the other methods listed in this post. You can then use custom CSS to make other changes if you need to or simply save the file. Make sure to name the file something memorable and descriptive, so you can easily find it in the future.
Finally, upload your new template to your theme’s or child theme’s folder using SFTP. The template option as you’ve named it (so in the example above, “Featured Article”) will appear in the Template drop-down menu in the Post Attributes section of each of your posts.
4. Use a Plugin to Remove Your WordPress Sidebar
If custom coding isn’t your thing or you’re just nervous about the prospect of editing your theme’s files, you can use a plugin to remove your WordPress sidebar instead. There are several solutions that can help you accomplish this task.
One handy option is Content Aware Sidebars:
This plugin gives you full control over your sidebar widgets. For example, you can create specific sidebars for different areas of your site. In addition, you can hide or show your sidebars on any post or page.
Alternatively, Simple Page Sidebars offers a more straightforward approach:
Content Aware Sidebars has a lot of bells and whistles for those who want to remove the WordPress sidebar from some pages and incorporate custom sidebars on others. On the other hand, Simple Page Sidebars gives you similar control without potentially unnecessary features.
If you want a truly simple way to remove your WordPress site’s sidebar, Widget Disable is probably a better fit for you:
Using this plugin, you can remove sidebars and dashboard widgets with just a few clicks. It’s simple and streamlined and can be an excellent quick fix if you don’t need to make any changes to your sidebars apart from getting rid of them.
Although they have many useful qualities, in some cases WordPress sidebars can distract from your content, clutter your pages, and lower the quality of your mobile site. They’re still prominent in many WordPress themes, however, so learning how to remove them is key if you want to achieve your ideal layout.
Here are four methods you can use to ditch your WordPress sidebar:
- Completely remove the sidebar from your WordPress site by editing your theme’s files.
- Remove the sidebar from a static page by creating a template.
- Create single posts without sidebars using a custom post template.
- Use a plugin to remove your WordPress sidebar.
Save time, costs and maximize site performance with:
- Instant help from WordPress hosting experts, 24/7.
- Cloudflare Enterprise integration.
- Global audience reach with 28 data centers worldwide.
- Optimization with our built-in Application Performance Monitoring.