Deactivating widgets from the sidebar in WordPress
When 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.
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.
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:
<!-- Begin Comment
Code goes in between here
End Comment -->
Add the comment code to the page in the Theme editor and Click Update File
To learn more about Widgets, please visit Introduction to Plugins & Widgets
‹Section 7: Deactivating widgets from the sidebar in WordPress
›Section 9: Completely disabling Comments from WordPress in the code
We value your feedback!
new! - Enter your name and email address above and we will post your feedback in the comments on this page!
|1.||What are Plugins and Widgets?|
|2.||Searching for & Installing Plugins|
|3.||Updating a WordPress Plugin|
|4.||Finding and Installing Widgets in WordPress|
|5.||How to use the WordPress Text Widget|
|6.||How to disable the comments on a page in WordPress|
|7.||Deactivating widgets from the sidebar in WordPress|
|8.||Completely disabling the sidebar links/widgets in WordPress|
|9.||Completely disabling Comments from WordPress in the code|
|10.||How to disable blogging features in WordPress|