Site logo

Archived topic

GeneratePress ans WP Multisite

2 replies · Started by Anonymous on November 30, 2014

Viewing posts 1–3 of 3

First of all congratulation for the beautiful job!
I would like to use GeneratePress on wordpress multiuser and I'm considering to buy the addon Super Package. The question is:
Is there any way to use the addon to customize the template by the network administrator but then inhibite the access to customization by the site administrators?
Many thanks and regards

Hmm, I'm not sure about this, but maybe adding a function like this would work..

if ( !is_super_admin() ) {
	add_action( 'admin_menu', 'remove_customize_page' );
	add_action('after_setup_theme', 'generate_remove_admin_page');
}
function remove_customize_page(){
	global $submenu;
	unset($submenu['themes.php'][6]); // remove customize link
}

function generate_remove_admin_page() {
	remove_action('after_setup_theme', 'generate_create_menu');
}

You want to add this using a plugin like: https://wordpress.org/plugins/code-snippets/

What this should do, in theory, is remove the Customize link and GP menu from the admin area if the user isn't a network admin.

Untested, so let me know how it goes.

Thanks Tom, I'll give ii a try!

This archived topic is closed to new replies.