Hide or Remove Sidebar from Any Page in WordPress

In this tutorial we will show how easy it is to remove a sidebar from any page or post and get a full-width layout. This method will work in all modern, well-coded WordPress themes using only the best plugin to hide sidebars! No coding. No custom templates.

Does My Theme Support Hidden Sidebars?

If you have a modern WordPress theme, it should automatically support full-width layouts when hiding sidebars. To understand how WordPress themes handle and display widget areas, we need to look at two basic functions you might’ve come across if you have ever looked at the code in your theme:

  • is_active_sidebar('name') – checks if a specific widget area is active or not
  • dynamic_sidebar('name') – displays a specific widget area

But what is an active sidebar? In general, a sidebar that contain widgets is active, while an empty sidebar is inactive. The 3 most common cases for how WordPress themes handle inactive sidebars are:

  1. Sidebar is completely removed, and a full-width layout takes up its space (Standard in modern, well-coded themes)
  2. Sidebar is hidden, but a blank space takes its place
  3. Sidebar is hidden, but hardcoded widgets take its place (Used to be the norm in the early days of WordPress)

If you follow this tutorial and find out that your theme falls into case 2 or 3, you can use the first function mentioned above to implement case 1. Though, if you’ve previously considered upgrading to a newer theme, now might be the right time to do it. The default Twenty Seventeen theme or highly popular Storefront are both great options, and both support completely hiding a sidebar.

 

Best WordPress Plugin to Hide Sidebars

First, we will have to install a plugin that will make it possible to remove sidebars from any page without using any code: Content Aware Sidebars is the best and most popular WordPress plugin to show and hide different sidebars on different types of content.

Screenshot of WordPress Sidebar Plugin installation

Go to Plugins -> Add New the Admin Dashboard on your WordPress site, search for “content aware sidebars” and click “Install Now”. Then “Activate”. You will now be able to create an unlimited number of widget areas and hide any widget area in your theme on select conditions.

Now let’s get started!

 

Remove Sidebar from Individual Pages

Some themes include a custom full-width template that can be used to remove the sidebar from pages manually. You would then have to go in and edit every single page you wanted to make full-width, or you would have to find and bulk edit them. That’s easy if it’s only a few pages, but it can get quickly confusing as your site grows. And what happens when you switch themes? You would have to do it all over again.

With Content Aware Sidebars it’s super easy to hide the sidebar from individual pages, or even from all pages at once!

 

Screenshot of sidebar condition for pages

  1. In the Admin Dashboard, go to Sidebars -> Add New
  2. Click on the “Select content type” and select Pages
  3. Click on the new input field and select the pages you want to remove the sidebar from (leave it empty for all pages)
  4. In the Options box, select Action: Replace and pick the Target Sidebar you want to hide
  5. Give the new sidebar a title, e.g. Hidden Sidebar, and click Save

That’s all there is to it. Remember, because this sidebar is inactive (empty), it will automatically be hidden on the pages you selected.

 

In our example, we have removed the sidebar from the pages My Account and Checkout in the Storefront theme. This is how one of the pages looked before, showing a default sidebar:

Screenshot of old Storefront checkout page

 

And this is how the same page looks with a hidden sidebar:Screenshot of new Storefront checkout page

 

Remove Sidebar from Blog or Posts

Following the same steps as above, we will now hide the sidebar from the WordPress blog or all single posts. Instead of creating a new custom sidebar, we can reuse the one from before (Hidden Sidebar) and add more conditions. Of course this will only work if posts and pages by default share the same sidebar.

 

Screenshot of hiding wordpress sidebar on posts

  1. On the Edit Sidebar screen, click on the bottommost “Select content type” and select Posts
  2. Leave the new input field empty
  3. Click Save

And that’s it! The sidebar will now be hidden on all posts and the blog (Posts Page). If you only want to hide it on the Blog page, click on the Settings button for the condition and toggle Singulars to OFF. Toggle Archives to OFF to remove the sidebar from all posts instead.

Screenshot of sidebar condition settings

 

Remove Sidebar from Custom Post Types

With the powerful conditions in Content Aware Sidebars, you can also remove sidebars from any custom post type, any custom taxonomy, and other content created with plugins.

For example, you can hide the sidebar on posts by a featured author, on posts in a select category, or on multilingual pages when using WPML. You can even remove the bbPress forum sidebar, the BuddyPress sidebar, or the WooCommerce product sidebar.

 

I hope this tutorial has showed you how easy it remove the sidebar from any page in a modern WordPress theme without coding. Check out all theΒ supported sidebar conditions, and let me know in the comments where you have decided to hide sidebars and what theme you are using!

 

If you are still having trouble hiding a sidebar, please open a support thread on wordpress.org, or click here to get premium email support for Content Aware Sidebars Pro.
Share This Article

15 Comments

  • Donna Cavalier says:

    That was actually more helpful than I expected it to be. I never thought about in essence using a sidebar to remove sidebars. Clever. Thanks for the tips.

  • I am using this plugin with storefront and, more directly, learnpress. It has not removed the sidebar on my courses and related pages. Any ideas?

  • Diana Petrillo says:

    Hi! Great post. I added the plugin, however when I input the page I want the sidebar removed from I get the message “no results found.” Perhaps the plugin doesn’t work with my themes (Marianne, Genesis, and Twenty Sixteen)?

    • Thank you! Could you open a support thread in the link below and explain the problem in more detail, e.g. is the page you try to select a “special page”, such as Blog/Front page

      https://wordpress.org/support/plugin/content-aware-sidebars

      Then I will be happy to help πŸ™‚

      • Diana Petrillo says:

        I think I solved the problem, but now I think my mediavine ads are interfering–I’ll have to figure out how to deactivate them from my sidebar on the pages I want to go full screen. Thanks for your willingness to help out! Much appreciated πŸ™‚

        Blessings,

        Diana
        Adirondack Girl @ Heart

  • valeria says:

    Hello Joachim, i believe i’ve seen you on skillshare, i’m glad if it is you.
    they plugin doesnt seem to be working for me, same problem you solved for jamie johnson below, but i tried the OR OR between conditions, but still i have the sidebar, i will appreciate your help a lot. my theme is one press. thank you

  • James Idayi says:

    Can the plugin remove side bar from a page but a blank space takes its place

  • Anita by Design says:

    I just went to plugins and there is no such plugin as “content aware sidebars” HELP!

  • Richard says:

    All this does is hide widgets from specific pages… it does NOT hide the sidebar.
    I have sidebar enabled with my them (on the right) and want to show the sidebar on 1 specific page. For example, I have a twitter widget I want displayed on my Events page, and ONLY that page, so I install this plugin, create a new sidebar, add the rule to only show the sidebar on the Events page, save and refresh… the sidebar is visible on every page, but the widget is not: it is only visible on the Events page.

  • Maggie Vance says:

    After getting my site tested, I had a lot of people say that the white space on the side of my site (side bar) made it look boring. I don’t have any widgets on it, it is just white. I followed the instructions to hide the sidebar for pages and it is still there. What am I missing?

Leave a Reply

Your email address will not be published. Required fields are marked *

Ready to design and display widget areas the easy way?

Psst... This is a conditional widget area built with Content Aware Sidebars