BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Number of Groups per Page
Tagged: groups-loop
- This topic has 3 replies, 2 contibutors, and was last updated 8 years ago by Anonymous.
Question
April 6, 2016 at 9:22 pm #67167@drronI am trying to increase the number of groups shown per page. I tried the following in the groups loop in my child theme:
<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ), 'per_page=40' ) ) : ?>
This does not produce the desired results, nor does it throw an error.
Is there a setting somewhere that I missed?Answers
April 7, 2016 at 6:10 am #67209@
AnonymousHi @drron, As in BuddyPress there are no options for this so you can try this plugin
https://wordpress.org/plugins/buddypress-better-pagination/
or try to customizegroups-loop.php
for groups please follow this one
https://buddypress.org/support/topic/group-directory-how-do-i-change-the-number-of-groups-viewed-per-page/Regards
April 7, 2016 at 11:23 am #67275@drronThank you for your response. I had seen the forum post that you are linking to. Unfortunately it does not show the code that the user tried and which actually did not work.
I did however find the following and it is working:
‘//display 30 groups per page
function mk_groups_number( $loop ) {
if ( bp_is_groups_directory() ) {
$loop[‘per_page’] = ’30’;
}
return $loop;
}
add_filter( ‘bp_after_has_groups_parse_args’, ‘mk_groups_number’);’April 7, 2016 at 1:08 pm #67285@
AnonymousHi @drron, Glad you were able to get this sorted out.
If you have other concerns, just let us know and we will be more than happy to assist you.
Regards
- The question ‘Number of Groups per Page’ is closed to new replies.