Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_has_activities trouble filtering by user_id with other arguments

  • Avatar of clecocq
    clecocq
    Member

    @clecocq

    Hi all,

    Can someone tell me what I’m doing wrong?

    I’m trying to get members activity and display to 5 max. When I don’t filter by “user_id” everything works fine, the result only displays 5 members. But when I filter by user_id, if I set max, per_page or something else, they are not considered, and all my members are displayed.

    The code for $member_list works, because sometimes I need to filter by “following” using the buddypress-followers plugin, so it works, but same problem, cannot set ‘per_page’ or ‘max’ using user_id.

    Any idea on this? I am doing something wrong?

    Here is the code :

    Working : “

    Working but no filter… (so not working, in a way) :

    `<?php
    $get_users = get_users(‘orderby=nicename’);
    foreach ($get_users as $user) {
    $member_list .= $user->ID . ‘,’;
    }
    $member_list = substr($member_list,0,strlen($member_list)-1);
    ?>

    `

You must be logged in to reply to this topic.