1. Home
  2. Tutorials
  3. Removing the Sidebar Links/Widgets in WordPress

Removing the Sidebar Links/Widgets in WordPress

Removing Sidebars Links and Widgets in WordPress
Removing Sidebars Links and Widgets in WordPress


Sometimes when you work with a WordPress theme, usually, webmaster wants to completely remove the sidebar links and widgets from the theme.  You could do this using the Widgets or by simply modifying the source code of the sidebar.php file in the WordPress Appearance editor.

How to get rid of sidebar Widgets

You have multiple ways to disable sidebar widgets. In this article we are going to show you how you can completely remove the sidebar links an widgets from the birdsite theme using the Widget editor and through the Appearance editor.

Completely deleting sidebar widgets through the widgets editor.

Step 1: Login to the WordPress Dashboard

Step 2: Click on Appearance, then click on Widgets.

Step 3: Append a blank text widget.

Then the links and widgets are not going to be displayed.

If somehow, the widget text box isn’t available or won’t work, you can comment out the code to delete the sidebar links and widgets. Commenting the code is great since the original source code won’t be changed. If the source code is different and the site breaks, it could become difficult to recall which change broke it, especially if the code is removed.

Removing sidebar widgets completely through the code

Step 1: To begin, login to your WordPress Dashboard, next click on Appearance and then Editor on the left hand side of the WordPress dashboard, once you are at the edit themes page, choose the sidebar.php page on the right hand side in the Templates section.

Step 2: After you’ve selected it, the code for the sidebar.php is going to load in the Theme editor window, make sure that you are being careful when you are editing the source code of a WordPress theme, it could cause critical damage and if the code isn’t edited correctly, the site is going to break. If you feel uncomfortable editing the code, be sure to check with a developer before continuing.

Step 3: Append a comment to the code like shown in the screenshot below. HTML comments will look like the following:

Step 4: Append the comment code to the page in the Theme editor then press on ‘Update File’

Next time you visit the WordPress site, you will no longer see the sidebar or any widgets or links at all.


Updated on February 11, 2018

Was this article helpful?

Related Articles

Add A Comment