WordPress.org

Ready to get started?Download WordPress

Forums

removing widgets from widgets admin area (8 posts)

  1. brook1979
    Member
    Posted 3 years ago #

    Hi WP people,

    Can anyone tell me what to look for or how to remove the widgets from with in the widgets admin area, i have managed to remove the standard widgets but im trying to remove widgets that indstalled via a plugin, i have used the class for that specific widget within the functions.php file and id dosnt seem to be working...

    Any help would be much appreceiated.

  2. Sigidi
    Member
    Posted 3 years ago #

    Try this mate.

    function unregister_default_wp_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_Categories');
    	unregister_widget('WP_Widget_Recent_Comments');
    	unregister_widget('WP_Widget_Tag_Cloud');
    	unregister_widget('WP_Widget_RSS');
    	unregister_widget('WP_Widget_Akismet');
    }
    add_action('widgets_init', 'unregister_default_wp_widgets', 1);
  3. Sigidi
    Member
    Posted 3 years ago #

    I think this is what i understood. Tell me if works

  4. brook1979
    Member
    Posted 3 years ago #

    Hi Buhle78,

    Thanks for your help, i have this now in my fucntions.php file and it has removed the default widget areas which is great, however i am still left with some that have been installed via a plugin, example:
    Plugin: "simple image widget" this is still showing up in my widgets section. This is what i got upto now... As you can see the bottom one i added is for the simple widget, but it still showing up in the widgets area..

    Any idea on how to remove widgets that have been installed via the plugin?

    Cheers again for the help, much appreciated after hours of searching...

    add_action('widgets_init', 'remove_widgets', 20);
    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_simpleimage');

  5. Sigidi
    Member
    Posted 3 years ago #

    What plugin is it?. you can hack the plugin.......

  6. brook1979
    Member
    Posted 3 years ago #

    well theres 2 actually... "simple image widget" and one is "contactbuddy"...

    So how do i hack the plugin, i looked in the files but i couldnt see where i could remove the widget from the admin area...im not really advanced enough (YET) at wordpress.

    Cheers again for the help.

  7. Sigidi
    Member
    Posted 3 years ago #

    I wish i could help further but that will mean spending sometime on the plugins. As a pointer, why not for the plugin's home page and ask the developers. They might be able to help you faster.

    I really sorry i couldn't help.

  8. brook1979
    Member
    Posted 3 years ago #

    ok no problem, well thanks for the help anyway. i will try the plugins authors pages see if that helps..

    Could you tell me when a plugin is installed, where does it register?? if that makes sense...

    Cheers again.

Topic Closed

This topic has been closed to new replies.

About this Topic