Archived topic
Page options working only for network administrator
9 replies · Started by Roberto Enrique on June 29, 2015
Today I realized that sidebar and footer widgets options are visible only for Network Admin and not for Single Administrator.
This is single site admin

This is Network Admin

This is really weird
Single site admin vs network admin shouldn't matter - those metaboxes only show for users who have the activate_plugins capability.
You can alter this by adding your own filter:
add_filter( 'generate_metabox_capability','generate_custom_metabox_capability' );
function generate_custom_metabox_capability()
{
return 'activate_plugins';
}
Here's a list of capabilities: https://codex.wordpress.org/Roles_and_Capabilities
You'll see "activate_plugins" as the first one under "Administrator".
Are you sure you have those two metaboxes selected under "Screen Options"?
Ok,my issue resides here:

I'll have to learn to be less paranoid and let my site admins to activate/deactivate plugins.
Thanks Tom.
You can always change it to whatever capability you like - that's the beauty of filters :)
Is it possible to add this filter as a mu-plugin?
This way i don't need to create a child theme just for this.
Thanks in advance
Ok, I've just created the plug-in... it was ridiculously simple.
Thanks
Awesome :)
For others, this plugin makes creating plugins super simple: https://wordpress.org/plugins/pluginception/
This is not working anymore :-(
Sections and Disable elements are working as expected but not for Footer Widgets or Sidebar Layout
Ok, fixed it. My fault.
add_filter( 'generate_metabox_capability','generate_custom_metabox_capability' );
function generate_custom_metabox_capability()
{
return 'delete_pages';
}
Glad you got this figured out! :)
