-
Author
-
July 7, 2018 at 20:58 #203191VanessaParticipant
Buddypress defaults to showing 20 items in the activity feed when it is loaded.
How can I change this default? I’d like to make it smaller.
thx
July 7, 2018 at 21:33 #203201Kieran_SQModeratorHi,
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 CODEfunction 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 CODEfunction 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 solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
July 7, 2018 at 23:18 #203225Kieran_SQModeratorHi,
You’re welcome, happy to help. If you have any other questions please feel free to open a new ticket and we’ll be happy to assist.
All the best,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.