• Resolved mucus

    (@mucus)


    Hi, I’m looking for a way to remove the ‘BadgeOS menu item from my members dashboard, but leave it on the administrators dashboard. I’ve tried different plugins with no luck, can you help?

    (The Quests are all detailed inside the site, so I have no need of it being there)

    https://wordpress.org/plugins/badgeos/

Viewing 1 replies (of 1 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Even though they wouldn’t be able to actually access the pages, I can understand wanting to remove it from the menu.

    Looking over the code, it shouldn’t be showing for anyone but administrators if the “Minimum role” setting is set to that, but the menu IS showing up. They get an error for trying to access it though. However, not all of the menu items are showing up. I believe it’s going to be because of the fact that achievements are post types, and the authors/editors/contributers are probably allowed to technically access though. It’s a weird middle spot, and I’m going to file a bug for it.

    In the meantime, you can use the code below in your functions.php file to hide it completely for everyone but admins.

    function mucus_remove_menu_item() {
    	if ( !current_user_can( 'manage_options' ) ) {
    		remove_menu_page( 'badgeos_badgeos' );
    	}
    }
    add_action( 'admin_init', 'mucus_remove_menu_item' );
Viewing 1 replies (of 1 total)
  • The topic ‘Removing BadgeOS menu from dashboard’ is closed to new replies.