Support » Plugin: Acunetix WP Security » Hide WP Security Dashboard menu from other multisite users

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Acunetix

    (@acunetix)

    Hello, Kathy

    For the moment, this is not possible becasue there is no configurable option implemented yet.

    We might implement it in one of the future versions though.

    Regards,
    Costin

    Hi Kathy,

    Create an mu plugin with the following code

    <?php
    
    function hide_dashboard_menu () {
    
    if ( !is_main_site($blog_id) ) {
    
    echo '<style type="text/css">
    #toplevel_page_wps_ {
    display:none;
    }
    </style>';
    }
    
    }
    
    add_filter('admin_head', 'hide_dashboard_menu');
    
    ?>

    This code checks to see if the site is a subsite. If it is, then it will add the css code into the admin header section to remove the menu item.

    Not sure how to create an mu plugin? Create the following folder /wp-content/mu-plugins. Then, create a new file in the folder (e.g. /wp-content/mu-plugins/hide-plugin.php). Paste the code above into the file and save. This will remove the menu item from all subsites.

    Best of luck!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide WP Security Dashboard menu from other multisite users’ is closed to new replies.