Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member parameters not working with bp_ajax_querystring()

  • I’m trying to allow more than the default 20 users per page in our members page, but whenever I pass in the parameters ‘per_page=50′ while bp_ajax_querystring(‘members’) is also passed in, I get pagination at 20 users and search and filter do not work. Adding the bp_ajax_querystring back in and removing the per_page parameter fixes the search and sort problem, but then I have pagination after 20 entries again. I am passing in the information like this:

    `bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘per_page=50′)`

    Am I doing something wrong? I have tried many different combinations, but none seem to work. Could bp_ajax_querystring be messing up the $args for bp_has_members?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of houfton
    Houfton
    Participant

    @houfton

    I think the answer to this is to use an ampersand. My version also has “&type=alphabetical” but that is optional:

    `bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&type=alphabetical &per_page=50′ )`

    Avatar of geoffreysf
    geoffreysf
    Participant

    @geoffreysf

    This helped me immensely while trying to hide the admin user from the member’s directory.

    Thank you!

    Avatar of t.schwarz
    t.schwarz
    Participant

    @tschwarz-1

    Thanks!

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

You must be logged in to reply to this topic.