BuddyBoss Home – Web Support Forums Themes Boss. theme Limit number of posts with activity infinite scrolling

Viewing 2 posts - 1 through 2 (of 2 total)
  • Question

    #42239
    @jiimi

    Is it possible to limit the number posts if activity infinite scrolling is enabled? Because I want to lower down my queries per load.

    Answers

    #42282

    Anonymous
    @

    Hi @jiimi, you can add this function in your child theme functions.php, hopefully it will solve your issues.

    
    function bb_activity_loop_querystring( $query_string, $object ) {
        if ( ! empty( $query_string ) ) {
            $query_string .= '&';
        }
     
        $query_string .= 'per_page=10';
     
        return $query_string;
    }
    add_action( 'bp_legacy_theme_ajax_querystring', 'bb_activity_loop_querystring', 20, 2 );
    
    

    for ref you can take a look of follow link
    https://codex.buddypress.org/developer/function-examples/bp_ajax_querystring/

    Regards
    Varun Dubey

Viewing 2 posts - 1 through 2 (of 2 total)
  • The question ‘Limit number of posts with activity infinite scrolling’ is closed to new replies.