Hi,
For the main activity feed please use the below snippet on a new line at the end of the KLEO Child theme’s functions.php file – you can do this via WP Admin > Appearance > Editor > KLEO Child > Functions.php or via your hosts file browser.
COPY CODE
function limit_main_activity( $loop ) {
$loop['per_page'] = 5;
return $loop;
}
add_filter( 'bp_after_has_activities_parse_args', 'limit_main_activity' );
You can also limit the individual members activity feed with the below snippet. Add this as per the instructions above
COPY CODE
function limit_members_feed( $loop ) {
// only fetch the last five entries if we're on a user's activity page
if ( bp_is_user_activity() ) {
$loop['per_page'] = 5;
}
return $loop;
}
add_filter( 'bp_after_has_activities_parse_args', 'limit_members_feed' );
In each instance change the number 5 to suit your needs.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution