BuddyDev

Search

[Resolved] Number of Members Displayed – Member Directory

  • Participant
    Level: Enlightened
    Posts: 23
    James Moss on #40040

    Hi Brajesh,

    Hope you’re well.

    We’re using BuddyBoss theme, and we’d like to display 24 Members Per Page on the Members Directory. Currently it displays 20 by Default.

    Many thanks,
    James

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #40045

    Hi James,
    Thank you for the question.

    Since BuddyBoss theme and the BuddyPress have similar loop, Here is a code that works for both.

    
     add_filter( 'bp_after_has_members_parse_args', function ( $args ){
    
         if( ! bp_is_members_directory() ) {
             return $args;
         }
         $args['per_page'] = 20;
         return $args;
     });
    
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 23
    James Moss on #40052

    Many thanks Brajesh,

    It worked perfectly.

    Best,
    James

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #40055

    Hi James,
    Thank you for confirming. I am glad it worked.

    Regards
    Brajesh

The topic ‘ [Resolved] Number of Members Displayed – Member Directory’ is closed to new replies.

This topic is: resolved