[Resolved] GeneratePress ans WP Multisite

Home Forums Support [Resolved] GeneratePress ans WP Multisite

Home Forums Support GeneratePress ans WP Multisite

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #50001
    oscar

    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

    #50100
    Tom
    Lead Developer
    Lead Developer

    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.

    #50279
    oscar

    Thanks Tom, I’ll give ii a try!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.