Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Adding new ‘Order By’ on members loop

@ch1n3s3b0y

Participant

@shanebp – That is cleaner and works, but pagination still doesn’t. Is it not possible to pass in the BP_User_Query parameters such as per_page in this format:

$object->query_vars['per_page'] = 10;

Tried this, but it seems to not work.

Do I need to use bp_pre_user_query_construct instead? I’m guessing I need to create a new function passing in these parameters?

Edit: I created a new function passing in this parameter:

$query->query_vars['per_page'] = 10;

I then add a new action for bp_pre_user_query_construct. This does indeed limit the first page’s results to 10; however it doesn’t display pagination to go to page 2 and it shows “1 – 11 of 11 Members” instead of “1 – 10 of 11 Members”.

Skip to toolbar