-
Author
-
August 14, 2015 at 00:29 #72925
jenny555
ParticipantHi, i try this : code but it don’t work for me. I have also a problem with women and man online on the homepage, it doesn’t work. Can you help me please? Thanks
August 16, 2015 at 01:23 #73185Laura
ModeratorHello, i already answer you in the other post:
“Hello, do you have your site in another language? If so, you need to change the shortcode in homepage, and change woman and man for your language words, also in the code above”
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 16, 2015 at 01:56 #73189jenny555
ParticipantHello Laura,
yes i have the french language activated. I tried what you told me to do, but it doesn’t work. Here is my functions file:COPY CODE<?php /** * @package WordPress * @subpackage Sweetdate * @author SeventhQueen <themesupport@seventhqueen.com> * @since Sweetdate 1.0 */ /** * Sweetdate Child Theme Functions * Add extra code or replace existing functions */ //Avatar default add_filter( 'bp_core_fetch_avatar_no_grav', '__return_true' ); function myavatar_add_default_avatar( $url ) { global $bp; $gender = xprofile_get_field_data('Je suis', bp_get_member_user_id()); if ($gender == "Homme") { return $img_url = SECU.'/wp-content/uploads/2015/08/avatarh.png'; } else { return $img_url = SECU.'/wp-content/uploads/2015/08/avatarf.png'; } } add_filter( 'bp_core_mysteryman_src', 'myavatar_add_default_avatar' ); add_filter( 'bp_core_default_avatar_user', 'myavatar_add_default_avatar' ); //manual total members add_filter( 'bp_get_total_member_count', 'kleo_my_total_members' ); function kleo_my_total_members($number) { $number = str_replace(".","",$number); return 1284; } //manual number online members 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 '195'; break; case "Woman": return $number+51; break; case "Man": return $number+134; break; default: return $number; break; } } ?>what doesn’t work? Also I didn’t understand what I have to change in the homepage. Thanks
Note : Please do not reply to the another post, thanks
August 17, 2015 at 19:03 #73432Laura
ModeratorHello, already replied, please let stay in the other post 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.