Removing widgets

Good day,

Is there a way I can remove specific widgets from subsequent sites in multisite, without disabling the feature?
I would like to remove it from the drag and drop area with widgets.

Cheers,
Shane

  • Fullworks

    I would like to remove it from the drag and drop area with widgets.

    If I undestand you correctly, you want to set up a 'global' widget that appears in all the network sites sidebars, but you don't want the admins of those network sites to be able to 'manage' that widget through the widget screen.

    If so, you are into some custom coding, and how you do that will depend on the specifics of what widget you are talking about and whether your network of sites all use the same theme or have lost of choices.

    The simplest way is to find the widgets code and hard code the function into the sidebar.php of your theme (or if you have lots of themes add an extra action hook to each sidebar.php) and unregister the widget (see unregister_widget()

    If you are not familiar with PHP/HTML and wordpress structures, you may want to outsource this task.

  • aecnu

    Greetings Shane,

    Thank you for letting me know but my solution was not what you are seeking in any event because after reading through this ticket again this would only prevent the widgets from showing on the site but not in the back end under widgets.

    Therefore they could still try to use them though they would not show on the front end using my solution.

    In either event, as I have suggested or Alan (ROIBOT) has suggested this will require custom coding which is beyond the scope of the support we provide here though we try to help you any way we can within reason.

    In this case with my suggestion, the coding would need to be removed from the theme and be 100% theme related - but it is not the solution you seek.

    There may be one more outside chance for a solution before calling in the custom coders - Advanced Access Manager plugin I believe will work by limiting the user role to custom settings in this case not allowing them to widget access.

    Please advise if this indeed does the job that you seek.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.