WP Plugin to hide certain widgets from non admin?

by pdunn
2 replies
Anybody know of a WordPress plugin that would hide certain widgets in the backend from non admins?

I have several customer sites where I would like to give them access to the widget area so they can use and customize certain widgets. But we do not want them to have access or see all the possible widgets in the install for a couple reasons. 1) we want to keep as much "white labeled" as possible and 2) too much access will inevitably mean a few of the users will accidentally change something... then need unnecessary support to get it back to the way it was...
#admin #hide #plugin #widgets #wordpress
  • Profile picture of the author SteveJohnson
    What's 'white labeled'? What are you attempting to hide?

    'Non-admins' do not have the capability of modifying widgets anyway. The 'edit_theme_options' role determines whether a user sees and can access the Appearances sub-menu options. Only the Super Administrator and Administrator roles have that capability.

    There is no way that I know of to hide certain widgets and not others. The widget list that populates each of the sidebars (in wp-admin/widgets.php) is not filtered; there is no way to influence the list.

    If you write your own widgets, you could create a new capability and assign it to certain users; then restrict the editing of a widget to only those with that capability. But you won't be able to keep them from removing the widget.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[7493630].message }}
  • Profile picture of the author pdunn
    I do a lot of work where the permissions for users are modified substantially. So in those cases, I can give non admins rights to widgets and other areas.

    Found what I was looking for over at Code Canyon.

    WordPress - WLB: Hide Widgets in Admin | CodeCanyon
    {{ DiscussionBoard.errors[7497694].message }}

Trending Topics