Thank you Jonas! I have put the code: <?php bp_has_members(bp_ajax_querystring(‘members’).’&per_page=150′))?> in index.php, members-loop.php and in bp-memberstemplate.php. Without success. Any more suggestions?
@dolf-h You can use following codes for group directory and members directory
add_filter( 'bp_after_has_groups_parse_args', 'wbcom_theme_alter_groups_parse_args' );
function wbcom_theme_alter_groups_parse_args( $loop ) {
if ( bp_is_groups_directory() ) {
{
$loop['per_page'] = 21;
}
}
return $loop;
}
For members directory replace 21 with your desired number
add_filter( 'bp_after_has_members_parse_args', 'wbcom_theme_alter_members_parse_args' );
function wbcom_theme_alter_members_parse_args( $loop ) {
if ( bp_is_members_directory() ) {
{
$loop['per_page'] = 21;
}
}
return $loop;
}
Thank you, Vapvarun. I used the codes at the bottom of bp-groups-template.php and bp-members-template.php. Without success. Then I put in into my functions.php in my child-theme, no results.
Perhaps I did something wrong?
Has anyone been able to solve this issue with only 20 members showing per page? I’ve tried every bit of code and file change that I’ve found on the help forum and so far nothing has altered it. I’m using the Legacy theme if that helps.
hi exni,
– tested code snippet above posted by vapvarun, for members directory.
– works as expected on both legacy & nouveau
details:
WP 6.1.1
BP 10.6.0
Twenty sixteen theme.
note: code snippet was added using Code Snippets plugin by Code Snippets Pro. (free)
hope this helps you.
I tried both versions in the functions.php file and with the Code Snippets plugin and it didn’t work. Does anyone know what might be overriding this? I’ve also changed the number to appear in the directory in the BuddyPress template files as well. Still only shows 20 members no matter what I try.