Unregister Widgets
-
I am attempting to make a cleaned version of WordPress that I can use for client websites, and therefore I want to be able to remove all of the default widgets and simply add in the ones I want to use by commenting out a line in the function.
I have tried using the following code:
add_action('widgets_init', 'remove_default_widgets', 10); function remove_default_widgets() { unregister_sidebar_widget('pages'); }
And also
function unregister_problem_widgets() { unregister_sidebar_widget('Calendar'); unregister_sidebar_widget('Search'); } add_action('widgets_init','unregister_problem_widgets');
Unfortunately neither of them have worked. Is there anything additional I have to put in my template file, or any calls I have to put anywhere else. Or has the way this is handled changed?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Unregister Widgets’ is closed to new replies.