Widget admin area added via a plugin
-
Hi People,
Was wondering if anyone can shed any light on this =, basically using the functions.php file i have managed to remove all the default dashboard widgets, however i wish to remove some that are left over which have been added by default when you install the plugin. Heres the code i have used to remove the default widgets, as you can see the bottom on labeled “contact buddy” is one that i am trying to remove but im not to sure how to remove it from the widgets admin area, theres a couple of others i need to remove, so could someone point me in the right direction on how to remove these,
Look forward to your reply’s because ive been searching for hours and all i can seem to find is “how to remove dashboard widgets”.
<?php
add_action(‘widgets_init’, ‘remove_widgets’, 20);
// This function name must match the name used in the add_action() function above.
function remove_widgets() {// Remove these WordPress widgets:
unregister_widget(‘WP_Widget_Pages’);
unregister_widget(‘WP_Widget_Calendar’);
unregister_widget(‘WP_Widget_Archives’);
unregister_widget(‘WP_Widget_Links’);
unregister_widget(‘WP_Widget_Meta’);
unregister_widget(‘WP_Widget_Search’);
unregister_widget(‘WP_Widget_Booking’);
unregister_widget(‘WP_Widget_Categories’);
unregister_widget(‘WP_Widget_Recent_Posts’);
unregister_widget(‘WP_Widget_Recent_Comments’);
unregister_widget(‘WP_Widget_RSS’);
unregister_widget(‘WP_Widget_Tag_Cloud’);
unregister_widget(‘WP_Nav_Menu_Widget’);
unregister_widget(‘WP_Widget_widget_contactbuddy’);}
?>
The topic ‘Widget admin area added via a plugin’ is closed to new replies.