This topic has 10 replies, 4 voices, and was last updated 11 years by airsidworld.
-
Author
-
December 10, 2013 at 01:16 #8029MarcyboyParticipant
I’d like to hide members real names and only show members nicknames. I found this piece of code I placed in functions.php but it doesn’t work.
/* Display Username in Directory */
function kleo_member_username() {
global $members_template;return $members_template->member->user_login;
}
add_filter(‘bp_member_name’,’kleo_member_username’);Could you tell me how to correct this please.
December 10, 2013 at 02:04 #8033adamParticipantthis plugin works great:
http://wordpress.org/plugins/buddypress-usernames-only/December 10, 2013 at 11:01 #8052MarcyboyParticipantThis plugin works for the members directory but not the members profile page.
December 11, 2013 at 13:54 #8105AbeKeymasterHi, You can edit members/single/member-header.php and change bp_displayed_user_fullname with bp_displayed_user_username
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.December 12, 2013 at 23:41 #8167MarcyboyParticipantHi Thanks for the reply. I have edited members/single/member-header.php and changed bp_displayed_user_fullname with bp_displayed_user_username which works OK for the members name above profile picture.
But the members name is still displayed in the About Me section to the right of the profile picture.
December 14, 2013 at 02:50 #8240AbeKeymasterHere is a topic that shows how to hide the name in the profile page: https://archived.seventhqueen.com/forums/topic/hide-fields-in-profile-accordion
For the Tab next to the profile image you need to apply the same conditionals as above in this file: wp-content/themes/sweetdate/custom_buddypress/class-bp-tabs.php where you find bp_get_the_profile_field_name()
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.December 19, 2013 at 01:24 #8532AbeKeymasterYou can place the file in your child theme.
The same condition to check for the name.You require basic php knowledgeHi 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.December 20, 2013 at 16:50 #8625AbeKeymasterHi,
I hope you understand that you need to hire a developer for customization purposes since this is not the scope of this forum to do customization for each user 🙂
You need basic PHP knowledge if you want to change code.Anyway, for this one replace:
COPY CODE$this->tabs_instance->fields_data[$name] .= '<dt>'. bp_get_the_profile_field_name().'</dt>'; $this->tabs_instance->fields_data[$name] .= '<dd>'. bp_get_the_profile_field_value().'</dd>';
with
COPY CODEif (bp_get_the_profile_field_name() != "Name") { $this->tabs_instance->fields_data[$name] .= '<dt>'. bp_get_the_profile_field_name().'</dt>'; $this->tabs_instance->fields_data[$name] .= '<dd>'. bp_get_the_profile_field_value().'</dd>'; }
and
COPY CODE$this->tabs_instance->fields_data[$name] .= '<div class="callout"><div class="bp-profile-details">'; $this->tabs_instance->fields_data[$name] .= bp_get_the_profile_field_name(); $this->tabs_instance->fields_data[$name] .= '</div><div class="cite">'. bp_get_the_profile_field_value() .'</div></div>';
with
COPY CODEif (bp_get_the_profile_field_name() != "Name") { $this->tabs_instance->fields_data[$name] .= '<div class="callout"><div class="bp-profile-details">'; $this->tabs_instance->fields_data[$name] .= bp_get_the_profile_field_name(); $this->tabs_instance->fields_data[$name] .= '</div><div class="cite">'. bp_get_the_profile_field_value() .'</div></div>'; }
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.December 20, 2013 at 18:40 #8639airsidworldParticipantOk thanks a lot for the code, i’ll try it ;).
I understand for the customization, I just thought that hidding Full Name of users for privacy purpose would interest a lot of people, as it is usally done on dating website. -
AuthorPosts
You must be logged in to reply to this topic.