Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Tools > BuddyPress administration menu option


  • juliamb
    Participant

    @juliamb

    Hi!

    I’ve created a custom role that can edit groups, so it has the ‘manage_options’ capability assigned.
    Now I’m trying to hide the option Tools > BuddyPress from the administration menu for this role. I was following this tutorial but I cannot find the way to address that specific page.
    I’m using this code but it’s not working:

    remove_menu_page('bp-tools');

    The page URL is different from administrator role to the others.

    • URL for Administrators: /wp-admin/tools.php?page=bp-tools
    • URL for other roles: /wp-admin/export-personal-data.php?page=bp-tools

    How can I hide this menu option?

    Thanks, regards.

Viewing 1 replies (of 1 total)

  • shanebp
    Moderator

    @shanebp

    The manage_options capability allows a user to do most anything in wp-admin.
    So focusing on the bp-tools screen seems like a minor issue.
    Preventing access to that screen while allowing them to have access to everything else seems like a recipe for trouble.

    But if you are committed to preventing that access, the easiest approach would be to redirect them when they try to access it.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar