Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dynamic Admin Bar Link – Can’t find answer anywhere

  • @anisjolly

    Member

    Hey all

    I’ve looked high and low and I’m sure I’ve looked everywhere in order to find an answer for this little dilemma I have.

    However, I would like to add links to an admin bar – I sort of know how to do that but I can’t for the life of me figure out how to show and hide the link to users who either have access to a group or not.

    I.e. I have a group called Group A. I only want members of Group A to be able to see the link in the admin bar. If users who do not belong to Group A login – they don’t see that link.

    Is this possible to do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @ipstenu

    Participant

    If you’re talking about the buddybar, read this: https://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/

    If you’re talking about the WordPress 3.0 admin bar, that’s different.

    In either case, you want this code: `groups_is_user_member( $user_id, $group_id )` :)

    @anisjolly

    Member

    hey lpstenu

    thanks for your reply. I’ll give that piece of code a go. Fingers crossed it’s what I’m after.

    :D

    I’ll reply back with the results. I’m guessing I need to add this to the bp-custom.php file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic Admin Bar Link – Can’t find answer anywhere’ is closed to new replies.
Skip to toolbar