This topic has 4 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #184172
     alexhorie
    Participant

    Hello, i asked before how to increase the numbers of online members, but now i want increase non online members, because i have to many from 1 gender and to less from another, i want make that more equal,

    how can i do that please?

     

    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+63;

    break;

     

    case “Woman”:

    return $number+8;

    break;

     

    case “Man”:

    return $number+6;

    break;

     

     

    default:

    return $number;

    break;

    }

     

    }

    #184296
     Kieran_SQ
    Moderator

    Hi,

    I will assign this ticket to one of developers to assist you with your query. They’ll be in touch as soon as they can, Monday to Friday, East European Time. Please note there is no service over the holiday so you may experience some minor delay in receiving a response.

    Thanks,

    Kieran.

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #184621
     Radu
    Moderator

    Hi,

    Try with this code : https://pastebin.com/raw/jdLB9ZV0

    Add it in your child theme functions.php

    edit the values with your desired

    Cheers
    R.

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

    Thank you
    but i have custom gender fields, for people online and total members im using this code that i got here in the support before, but for increase my custom genders is not working, also i want increase the offline numbers of the custom gender.

    there is this in the code you sent me, is the custom means i can add the custom gender here and increase the number of users?

    case ‘custom’:
    $image = ( $image == ” ) ? get_template_directory_uri() . ‘/assets/images/icons/steps/status_01.png’ : $image;

    $field = $field != ” ? $field : false;
    $value = $value != ” ? $value : false;
    $online = $online == ‘yes’ ? true : false;
    $number = bp_member_statistics( $field, $value, $online );
    break;

    the code im actually using

    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+13;
    break;

    case “Woman”:
    return $number+8;
    break;

    case “Man”:
    return $number+6;
    break;

    case “M2F Pre-op”:
    return $number+1000;
    break;

    default:
    return $number;
    break;
    }

    }

    add_filter( ‘bp_get_total_member_count’, ‘kleo_my_total_members’,99 ,1 );
    function kleo_my_total_members($number) {
    $incremented_number = ( $number + 1000 );
    return $incremented_number;
    }

    #185934
     Radu
    Moderator

    Hi,

    Just use this code instead

    CODE : https://pastebin.com/raw/urrXHSZP

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?