Hiding users and user count

  • Participant
    Level: Enlightened
    Posts: 72
    Nifty on #38885


    I have followed the ID code you have provided for BuddyPress here (https://buddydev.com/hiding-users-on-buddypress-based-site/) and it works well. Thank you for this.

    As the member count does not reflect this change, how can this be done? A commenter asked about this in the comments in the article. Did this get resolved? If so, is there a link to it?

    Thank you, very much!

  • Keymaster
    (BuddyDev Team)
    Posts: 24094
    Brajesh Singh on #38890

    Hi Nifty,
    Thank you for the question.

    You can filter on the total member count and update the count.
    Here is an example showing that we remove 4 from the count.

    add_filter( 'bp_get_total_member_count', function ( $count ) {
    	// return updated count.
    	return $count - 4; // decrease by 4 or so.


  • Participant
    Level: Enlightened
    Posts: 72
    Nifty on #38895

    Hi Brajesh,

    Thank you for your reply and help, we really appreciate it.

    We have placed this code under the code to exclude IDs but it doesn’t work. How do we go about getting both snippets to work together?

    We are novices with code, so we apologise for our lack of understanding!

You must be logged in to reply to this topic.

This topic is: not resolved