This topic has 1 reply, 2 voices, and was last updated 10 years by Abe.

  • Author
  • #27185
     Rey
    Participant

    I found in this forum how to modify the number of members in homepage but women and man don’t work, I think for the translated fields, how can I do?. This is my page and functions.php:

    [kleo_status_icon type="total" subtitle="Utenti totali"] [kleo_status_icon type="members_online" subtitle="Utenti online"] [kleo_status_icon type="custom" field="Io sono un" value="Donna" online="no" subtitle="Donne" image="wp-content/themes/sweetdate/assets/images/icons/steps/status_03.png"] [kleo_status_icon type="custom" field="Io sono un" value="Uomo" subtitle="Uomini" online="no" image="wp-content/themes/sweetdate/assets/images/icons/steps/status_04.png"]

    COPY CODE
    add_filter( 'kleo_online_users_count', 'kleo_my_online_users', 10, 2);
    function kleo_my_online_users($number, $value) {
        switch ($value) {
            //ALL MEMBERS ONLINE
            case FALSE:
                return $number+6;
                break;
     
            case "Donna":
                return $number+8;
                break;
            
            case "Uomo":
                return $number+6;
                break;
            
            
            default:
                return $number;
                break;
        }
        
    }
    
    add_filter( 'bp_get_total_member_count', 'kleo_my_total_members' );
    function kleo_my_total_members($number) {
    $number = str_replace(".","",$number);
    return $number+14;
    }
    #28508
     Abe
    Keymaster

    Make sure to set the Sex field under Sweetdate – Buddypress. Also make sure that Uomo, Donna are the exact values you set under Users – Profile fields for the sex field

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?