Skip to:
Content
Pages
Categories
Search
Top
Bottom

change the number of members to be displayed per page


  • koms
    Participant

    @koms

    I’m displaying member list in my home page.By default, the number of members per page is limited to 10. I want to change the number of members to be displayed per page. How to do that? please help.

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    Can you confirm you are using members widget or what. If you are using members widget , you can change the number from Dashboard->appearance->widgets, go to members widget (which is assigned to some area on you home) and change the number there(show max no. field)

    If you are using custom code, you will have to do it manually, using the member loop


    koms
    Participant

    @koms

    Brajesh,

    Thanks for your reply.

    I’m using buddypress 1.1.2. Somehow my plugins got missed. So I reinstalled again. but now the member list is not displayed. The message I’m getting is ‘No members found’


    koms
    Participant

    @koms

    I reinstalled again. Everything works fine now.

    To change the number of members to be displayed per page,

    goto bp-core/bp-core-template-tags.php.

    Then change $per_page to any number.


    Brajesh Singh
    Participant

    @sbrajesh

    check your database, the members still exist ?

    I am unable to think a solution right away, but I remember DJPaul saying something like if the members login, the list should update, if the users exists in database(wp_users)

    Edit: sorry I was In the middle of posting ,while you already posted the resolution :S

    Don’t change core files, you can pass a “per_page=XX” parameter into the template loop to change this.


    koms
    Participant

    @koms

    I’ve displayed members in home page.For that, passing the parameter did not work . It only works for the member directory listing.

    Correct me if I’m wrong.


    Manu-PB
    Participant

    @manu-pb

    Hello all,

    I have spent some time to understand what Andy said : “you can pass a “per_page=XX” parameter into the template loop”… I am pleased to share here the solution with you.

    In the file Themes / Your_Theme / Members / members-loop.php, change the line 5 :
    if ( bp_has_members( bp_ajax_querystring( ‘members’ ) ) ) : ?>
    to
    if ( bp_has_members( bp_ajax_querystring( ‘members’ ).’per_page=XX’ ) ) : ?>
    (note that there is a “dot” between bp_ajax_querystring( ‘members’ ) and ‘per_page=XX’) since arguments are passed as a chain.

    Hope it helps
    Manu


    Di_Skyer
    Member

    @di_skyer

    @Manu-PB for correct result you mast add in code symbol ‘&’
    For exaple: if you edit file In the file Themes / Your_Theme / Members / members-loop.php near the begin of it:
    to this:

    if ( bp_has_members( bp_ajax_querystring( ‘members’ ).’&per_page=XX’ ) ) : ?>

    where XX – is number

    tested on my own BP – it work

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘change the number of members to be displayed per page’ is closed to new replies.
Skip to toolbar