Tagged: hide user > member count off
Hey there,
I’m using the code you posted to hide admin role and certain ids from being displayed in the Members Directory you posted here…
https://buddydev.com/hiding-users-on-buddypress-based-site/
Thanks for that, very useful!
But when I look at the members page either as admin or as a user, the little bubble that says how many members there are is off by one, it says there is one more than is being displayed.
Any idea what would cause that behaviour?
ThanksHi,
Thank you for the question.You are right about the count. BuddyPress uses separate query for the total count and the members directory user listing.
That makes it complicated to have synchronized counts.
There is a solution by filtering
bp_core_get_active_member_count
and removing the no. of excluded users count from it but it is not a good solution.Can you share e your code here or pastebin, I may be able to assist by providing code for count synchronization.
Regards
BrajeshHi Brajesh,
Thanks as always for your thoughtful and quick response.I’m using the code that you supplied in the link
https://buddydev.com/hiding-users-on-buddypress-based-site/The first two…the one for ids and the one for roles.
I suppose the other option might be just to hide the count entirely?
Thanks again.
Hi La,
Thank you.
Using the css to hide count is a better and simple option here.Are you using BP legacy or BP Nouveau template pack?
Please let me know and I will assist.
Regards
BrajeshThank you for the details.
Please use the following css.
#members-all .count { display: none; }
Let me know if it worked or not?
Regards
BrajeshThank you. I am glad it helped and you were able to resolve the pagination on your own.
Regards
Brajesh
You must be logged in to reply to this topic.