Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to limit activity items for per page?

  • @alierkurt

    Participant

    Hello everyone! I want to limit my activity pages’ entries. I know there is “per_page” for that but in my activity-loop.php, there is a line like that:

    I tried to put it like “. It limited to 10 but ajax didn’t work. Where can I put “per_page=10” without breaking “bp_ajax_querystring” thing. Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @alierkurt

    Participant

    OK, I found the solution. For those who need that here is the solution:

    Add this to your functions.php:

    `function my_query_filter( $query_string ) {
    $query_string .= ‘&per_page=10’;
    return $query_string;
    }
    add_filter( ‘bp_dtheme_ajax_querystring’, ‘my_query_filter’ );`

    @hnla

    Participant

    The function and filter is overkill really you can add to the query string but concatenating the parameter :
    bp_has_activities( bp_ajax_querystring( ‘activity’ ) . ‘per_page=10’ )

    @nrfive

    Participant

    @alierkurt / @hnla

    could you tell me what file needs to be edited for this?

    Tried both codes, but not getting the results expected.

    @weblogian

    Participant

    @pisanojm

    Participant

    @hnla

    This is something that has been bothering me… Why does this:

    Cause the drop down search filters not to work? Is it wrong?

    @pisanojm

    Participant

    ok… I think I worked this out… needs to be .’&per_page=12′

    @igeekout

    Member

    Buddypress needs to do a better job of documenting things. Its like the give you a little idea but then get bored and forget to tell you the rest.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to limit activity items for per page?’ is closed to new replies.
Skip to toolbar