Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show Nav Link for Group Members Only in WP (not MU)


  • techguy
    Participant

    @crashutah

    I’m trying to get a nav item in a Group to only show for members of that group. I got it working in MU, but it’s not working in regular WP. In MU I used the bp_core_new_subnav_item() with this option set: ‘user_has_access’ => bp_group_is_visible() Is there something better to use to only show the nav to group members?

Viewing 7 replies - 1 through 7 (of 7 total)

  • techguy
    Participant

    @crashutah

    Anyone know a way to have a nav link only appear for group members besides: ‘user_has_access’ => bp_group_is_visible() ? That doesn’t seem to work with WP.

    is the group public? as bp_group_is_visible checks that first, if not then checks groups_is_user_member


    techguy
    Participant

    @crashutah

    Thanks! That worked for me on both WPMU and WP. Here’s the full code since it required 2 inputs:
    ‘user_has_access’ => groups_is_user_member($bp->loggedin_user->id, $bp->groups->current_group->id)


    Tegan
    Participant

    @tlp29

    For a complete n00b like me, could you please give a bit more detail on how to implement the code? This is exactly what I’ve been trying to do (make a page only visible in the nav to members), but haven’t been able to find a way to do it until now.

    Thank you!!


    techguy
    Participant

    @crashutah

    You’ll need to give a bit more details. Is this a new group page? Is it an existing group page? Does it have sub navs?

    It will take understanding a bit of coding, but if you give some details we can try and help.


    Tegan
    Participant

    @tlp29

    Hi :) It’s a new page with no sub navs. I only want the link to show up in the nav when a member is logged in. It should be invisible when not logged in. I’m using thesis.

    Thanks for replying so quickly – I hope you can help me.


    Tegan
    Participant

    @tlp29

    When I was googling for a solution, this page showed up – but I’m not using BuddyPress, so I am probably in the wrong place.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show Nav Link for Group Members Only in WP (not MU)’ is closed to new replies.
Skip to toolbar