Removing the Sidebar Links/Widgets in WordPress

05 Feb 2018 0 77  0
Removing Sidebars Links and Widgets in WordPress
Removing Sidebars Links and Widgets in WordPress


Webmaster will occasionally want to remove the sidebar links and widgets from a WordPress theme. If this occurs, you can do this by using the Widgets or simply modifying the source code of the ‘sidebar.php’ file in the WordPress Appearance editor.

There are multiple ways to disable sidebar widgets; in this article we are going to show you how to perform this task using the birdsite theme, the Widget editor, and the Appearance editor.

How to get rid of sidebar Widgets

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.

This should now mean that the links and widgets are not going to be displayed.

If the widget text box isn’t available or won’t work, you can comment out the code in order to delete the sidebar links and widgets. This method is great as it will not affect the original source code.

If the source code is different and the site breaks, it could become difficult to recall which change broke it, especially if it is the removal of code that broke it.

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, select the ‘sidebar.php’ page on the right-hand side in the ‘Templates’ section.

Step 2: After it has been selected, the code for the sidebar.php will load in the Theme editor window; make sure to take care when editing the source code of a WordPress theme as it could cause critical damage and, if the code is not edited correctly, the site may 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 click on ‘Update File’.

On the next visit to your WordPress site, you should no longer see the sidebar, any widgets, or links.


Add a comment

Leave a Reply