In this post we will go over the different methods of which you can remove or disable the default sidebar that shows in most WordPress themes.

First, let’s get one thing straight. The sidebar itself is a theme addition, and often has it’s own PHP file in the root directory of any given theme.

The sidebar widgets are plugin enhancements that can come from either themes or plugin installations, as well as modifications done by the site owner in functions.php

This is important because if you just wish to disable default sidebar widgets, you can simply go to:

Appearance -> Widgets -> Sidebar

Then once you are in that area, you can choose the location of the sidebar like so:

If the sidebar is still shown, even though you have disabled all widgets in that position, you will have to change some PHP files.

Don’t worry, we’ll walk you through every step of the process!

Remove sidebar via theme files (PHP)

This method involves changing the theme core files, which may not be the most considerate thing to do, if you wish to update the theme in the future since the update will override your changes. Instead, consider adding a child theme based on your current theme, and then remove the sidebar there. This guide will not cover adding child themes, so we assume you are OK with doing this the normal way.

First, go to:

Appearance -> Editor

Once there, use the right hand side menu to browse to these following files:

  • single.php
  • page.php
  • front-page.php

When loaded, go to the botttom of the template file, and find get_sidebar(); – remove this code to permanently remove the sidebar loading.

There might be other files specific to your current theme that loads “get_sidebar();”

So feel free to open Notepad++ and search in all files in that directory that calls the function get_sidebar(); and remove the lines accordingly.

Now you have permanently disabled the sidebar in WordPress, and this works for any theme that uses the normal sidebar functions. Some theme developers use their own, so you will have to look through the code and see if you can spot it yourself, or if you have to contact the developer and get them to name the function you need to remove.

Incredible Planet Staff

We deliver incredible facts from all around the world.
If the information is interesting, and fits into one of our five main categories; Animals, People, Places, Science or Space, we will feature it!


Most Shared Posts

Leave a Reply

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