Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display some submenu only for specific group user


  • Miatsu
    Participant

    @miatsu

    Hello,

    I’m actually using WordPress 3.9.1, BuddyPress 2.0.1 et bbPress 2.5.4 .

    For my website I have created differents forums for each user group. This forums will directly be displayed in the main menu as submenus.

    Is there a way to choose to display each forum submenu ONLY if the user is log in and a members of the group ?

    I have found some solution to filter menu by role, but in my case it will be the group that should be used to filter the menus elements.

    Thanks in advance !

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    If you’ve cracked the code for the submenu, then groups are a buddypress thing, so their forum might be better.

    But from total ignorance try….

    If you’ve phpmyadmin access, you could set up a user for a group, and see what changes in the usermeta, and then use this to create your filter

    eg
    if say you found that buddypress_group was what was used for groups, you could set the group using

    $current_user = wp_get_current_user();
    $group=get_user_meta( $current_user , 'buddypress_group', true);
    

    then dependant on group

    if ($group==22) then...
    if ($group==23) then....
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar