BuddyDev

Search

[Resolved] Hide members count in buddypress groups

  • Participant
    Level: Initiated
    Posts: 5
    zyntsz on #41562

    I would like to hide the member count from the groups.

    I looked around for some solution and found this code in bp-custom.php as mentioned in BuddyPress support but it doesn’t work:

    function john_gettext( $translated, $original_text, $domain ) {

    if ( ‘buddypress’ !== $domain )
    return $translated;

    switch ( $original_text ) {
    case ‘All Members <span>%s</span>’:
    return ‘All Members’;

    default:
    return $translated;
    }
    }
    add_filter( ‘gettext’, ‘john_gettext’, 20, 3 );

    I also tried adding this code in css but it doesn’t work:

    li#members-all span , li#activity-all span {
    display: none!important;
    }

    Anyways I can hide the member counts?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2944
    Ravi on #41578

    Hello,

    Thank you for posting here. Please let me know are you working with BuddyPress or BuddyBoss Platform. If BuddyPress which template pack you are using i.e. BP Legacy or BP Nouveau

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 5
    zyntsz on #41582

    I am using BuddyPress and BP Nouveau.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2944
    Ravi on #41587

    Hello,

    Please try the following CSS to hide member’s count on the group page

    
    #members-groups-li span {
        display: none !important;
    }
    

    Let me know if count hides or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 5
    zyntsz on #41589

    I tried adding it in additional css but still doesn’t work.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2944
    Ravi on #41592

    Hello,

    Thank you for the acknowledgement. Can you point me to the site so that I can provide you with the exact CSS?.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 5
    zyntsz on #41594

    Here: mangalogic.com

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2944
    Ravi on #41595

    Hello,

    I have checked the site and it is not showing me the group’s members count. Please check the following screenshot:

    https://www.awesomescreenshot.com/image/16755035?key=e6f43863e6e0dc21c8d5e673eb7d590a

    Please try after clearing your browser cache or try it in incognito mode.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 5
    zyntsz on #41597

    Its not there inside the individual group but the count is visible in the groups tab.
    Like here: https://prnt.sc/1zo5v7c

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2944
    Ravi on #41598

    Hello,

    For groups directory you can use the following code:

    
    add_filter( 'bp_get_group_member_count', '__return_empty_string' );
    

    Regards
    Ravi

The topic ‘ [Resolved] Hide members count in buddypress groups’ is closed to new replies.

This topic is: resolved