Skip to:
Content
Pages
Categories
Search
Top
Bottom

Filter members for a Team Page


  • kmw1130
    Participant

    @kmw1130

    I need to filter members for a Team Page, where only certain members how. I do not have a identifier to distinguish the team members. Do I need to create an profile field? Can I create a query to display for user-ids = 1,2,3,4? What is the best way to go about this?

    Do I update the theme-child\buddypress\members\member-loop.php or buddypress\bp-themes\bp-default\single.php?

    Any help will be greatly appreciated.

    Thank
    Kim

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

  • shanebp
    Moderator

    @shanebp

    You’ll need an identifier re team members. A profile field could work.

    You don’t say where the Team Page appears.

    Unless you are explicitedly using the bp-default theme, always use files from
    \buddypress\bp-templates\bp-legacy\buddypress\
    in your child theme.

    If you have a conditional, you could edit members-loop.php
    Something like:

    
    <?php
    $is_team_page = true; // something that returns a boolean
    if ( $is_team_page ) 
       $include = '&include=1,2,3,4';
    else
       $include = '';
    ?>
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . $include ) ) : ?>

    More info:
    https://codex.buddypress.org/developer/loops-reference/the-members-loop/


    kmw1130
    Participant

    @kmw1130

    The Team Page (support-team) is located under the About Us page.

    And I’m trying to add the Members Masonry Element to my support team page.

    I tried the code and the I indicated are not showing.


    kmw1130
    Participant

    @kmw1130

    Is there a way to use members of a group on my Team Page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter members for a Team Page’ is closed to new replies.
Skip to toolbar