-
Author
-
August 31, 2018 at 23:12 #208134
islamir
ParticipantIn sweetdate few profile details like Age/ sex/ etc are displayed with the avatar in the membership directory page. Can I have similar functionality in Kleo. I like that functionality, Please let me know how can I achieve that?
September 4, 2018 at 18:13 #208448Radu
ModeratorHi, Check this onefunction sqr7_extra_fields_members_directory() { $location = bp_get_member_profile_data('field=Location'); $specialization = bp_get_member_profile_data('field=Specialization'); $birthdayfield = bp_get_member_profile_data('field=Birthday'); if ($birthdayfield) { if(!empty($birthdayfield)) { $diff = time() - strtotime($birthdayfield); $age_to_age = floor($diff / (365 * 60 * 60 * 24)); // return $age_to_age; } } if ($specialization || $location) { echo 'if trouble with code above copy it from here : https://pastebin.com/raw/Reng9F8r Cheers R'. 'Location : ' . $location . ''; echo ''. 'Specialization : ' . $specialization . ''; echo ''. 'Ages : ' . $age_to_age . ''; } } add_action('bp_directory_members_item', 'sqr7_extra_fields_members_directory'); -
AuthorPosts
Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Bugs & Issues’ is closed to new topics and replies.