Skip to:
Content
Pages
Categories
Search
Top
Bottom

Added a filter in the member directory.


  • kamelblua
    Participant

    @kamelblua

    Hello, I added a drop down with as option the groups created by the users, my goal is when you click on a specific group, it displays the members of the group, cordially.

    Do you know how I can do that please?

    Screen :

    filter group

    filter group

    code :

    function add_dropdown_filter_society() {
    
        ?>
        <div class="flex bp-secondary-header align-items-center">
            <div class="push-right flex">
                <select id="groups-order-by" data-bp-filter="members">
                    <option value="active">Société</option>
                    <?php
                    $groups = groups_get_groups();
                    foreach( $groups["groups"] as $group ) {
    
                        ?> <option value="society"> <?php echo $group->name; ?> </option> <?php
    
                    }
                    ?>
                </select>
            </div>
        </div>
        <?php
    
    }
    add_action('bp_before_directory_members_content', 'add_dropdown_filter_society',10,3);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar