InMotion Hosting Support Center

remove-sidbar-links-completely-1-wordpressWhen working with a WordPress theme, occasionally, the webmaster may want to completely remove the sidebar links and widgets from the theme. This can be done through the Widgets or by editing the source code of the sidebar.php file in the WordPress Appearance editor.

There are several ways the sidebar widgets can be disabled. This article will explain how to completely remove the sidebar links and widgets from the birdsite theme through the Widget editor and through the Appearance editor.

Removing sidebar widgets completely through the widgets editor

  1. Log into the Wordpress Dashboard
  2. Navigate to Appearance > Widgets. Click here for information on removing and adding widgets.
  3. Add a blank text widget.

    Now the links and widgets will not display.

If for whatever reason, the widget text box is not available or does not work, the code can be commented out to remove the sidebar links and widgets. Commenting the code is good because the original source code is not changed. If the source code is changed and the site breaks, it can be difficult to remember what change broke it, Especially if the code is deleted.

Removing sidebar widgets completely through the code

  1. Log into the Wordpress Dashboard
  2. remove-sidbar-links-completely-2-wordpressNavigate to Appearance > Editor on the left in the Wordpress Dashboard.
  3. remove-sidbar-links-completely-3.-wordpressOn the Edit Themes page, select the sidbar.php page on the right hand side in the Templates section.
  4. remove-sidbar-links-completely-4-wordpressThe code for the sidebar.php will load in the Theme editor window.

    Important! Editing the source code of a WordPress theme is a critical change. If the code is not edited correctly, the site WILL break. If you are not comfortable editing the code, please check with a developer before proceeding.

    Add a comment to the code like in the snapshot to the right. HTML comments look like the following:


    Add the comment code to the page in the Theme editor and Click Update File

    remove-sidbar-links-completely-5-wordpressNow when visiting the WordPress site, the sidebar will not display any widgets or links at all.

To learn more about Widgets, please visit Introduction to Plugins & Widgets

Continued Education in Course 104: Introduction to Plugins and Widgets
You are viewing Section 2: Removing the Sidebar Links/Widgets in WordPress
Section 1: Deactivating Widgets from the Sidebar in WordPress

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2017-11-15 4:35 am

I want to hide sidebar from the specific post on my blog, please let me know is there any way to hide this?

40,963 Points
2017-11-15 10:52 am
Removing the sidebar for a specific post will require some coding. The WordPress community has provided various answers for this in this particular forum. Check out the solutions and see which works best for you.
n/a Points
2017-08-10 5:02 am

Excellent post! This is worked great. It just made my work easily. I like this post absolutely.



n/a Points
2017-07-04 2:13 am

Thanks. This worked great as I am new to wordpress. Very good!

n/a Points
2017-04-10 2:25 am

I used this update and now my wordpress is broken plus I cant even log back into wordpress admin.

43,761 Points
2017-04-10 11:41 am
Disabling the sidebar widget will not affect the login. That appears to be a different issue. Check out our article on Common WordPress Troubleshooting Techniques.
n/a Points
2016-12-01 8:31 am

This is not working on my themes 

please give another way to remove sidebar on my thmes

i am not a good php devloper that for you shoud simple answar to me


30,622 Points
2016-12-01 1:42 pm
Here is a helpful post from the official WordPress forums, where they discuss additional ways to remove the sidebar.

Thank you,
n/a Points
2016-06-27 7:24 am

Thank you very much. I am not very experienced with php and things, but I managed to get rid of the thing. Excellent.

n/a Points
2016-03-25 5:13 pm

OK, so now there's no content IN the sidebar, but there's still space for it. How do I make the space go away and the text part move to the center of the page?

43,761 Points
2016-03-28 1:05 pm
Removing the content does not change the structure of the theme. It still will contain the column, although empty. To change that you would either need to modify the theme code or find another theme that does not have that column.
n/a Points
2016-09-16 7:58 pm

After removing the sidebar, you may remove the space it was in by adjusting the child theme settings.

In the dashboard go to Child Theme > Settings > Layout and change the 'main layout' to the first box, so click the box that has no gray inside of it, indicating no columns on all pages. 


n/a Points
2015-06-13 8:11 am

Thank you so much. this worked for me. very simple logic, great.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

14 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!