-
Author
-
January 25, 2014 at 01:29 #10201GlobetrekkerParticipant
As many others, I would also like to get rid of the “full name” profile field in registration, members, profile and everywhere else on my site.
I know, there are a lot of post regarding this topic, but honestly, I find it extremely confusing with all these different forum topics, and I honestly don’t know where to start. As I know a lot more of your customers want to use usernames and remove full names for their sites, it would be fantastic with a guide on how to do this. This could be the guide on how to do this – I think it would save you guys and your customers a lot of time.
Appreciate your help,
ThanksJanuary 27, 2014 at 16:22 #10310AbeKeymasterHello, You can add this plugin or use just the code from this link in your sweetdate-child/functions to remove the Full name
https://github.com/daankortenbach/buddypress-remove-xprofile-fullname-field/blob/master/buddypress-remove-xprofile-fullname-field.phpHi 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.January 27, 2014 at 16:53 #10318GlobetrekkerParticipantThanks Abe..
I tried to just copy all the code from the link and added it to the bottom of sweetdate-childe/functions, but I guess I do it the wrong way, cuz it comes up with some serious errors..
Can you state where exactly I have to add it? Should I add it between some lines of codes or should I only copy some of the code from the link? Right now, I copy everything – black, green and red text. Is this wrong?Thanks
January 29, 2014 at 18:41 #10367GlobetrekkerParticipantStill looking for an answer to my question though 🙂
February 2, 2014 at 01:08 #10452GlobetrekkerParticipantStill looking for some help on this issue Abe.. Please advise. Thank you
February 6, 2014 at 11:52 #10552AbeKeymasterHi, you should get everything starting from
add_filter( ‘xprofile_group_fields’, ‘dk_bp_remove_xprofile_fullname_field’, 10, 2 );and put it in the functions.php file at the end of the file before the ending ?>
or if you can’t seem to do it right, just copy the file in your wp-content/plugins folder and activate it as a regular plugin
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.February 9, 2014 at 23:53 #10781GlobetrekkerParticipantHi Abe,,
Thanks.. I have tried both options now. Both in Functions.php and also uploaded it as a Plugin.
Every time I activate this, a Profile Field I have added disappears, and then no one is able to register. The register page just refresh.Any other options? MANY of the guys in here must have done something about this issue already, as it is a really important thing for any dating site.
February 12, 2014 at 00:54 #10866AbeKeymasterHi, Indeed that code had some issues. Please add this to sweetdate-child/functions.php
COPY CODEadd_filter( 'xprofile_group_fields', 'dk_bp_remove_xprofile_fullname_field', 10, 2 ); /** * Removes the default BuddyPress xprofile fullname field * * @param array $fields Array with field names * @return array Array with filtered fields * * @author Daan Kortenbach */ function dk_bp_remove_xprofile_fullname_field( $fields ){ if( ! bp_is_register_page() ) return $fields; // Remove item from array. foreach ($fields as $key => $value ) { if ( $value->id == 1 ) { $fields[ $key ] = array(); } } // Return the fields return $fields; } add_action( 'bp_after_signup_profile_fields', 'dk_bp_add_xprofile_fullname_field_hidden' ); /** * Adds the default BuddyPress xprofile fullname field as a hidden field * * @return string * * @author Daan Kortenbach */ function dk_bp_add_xprofile_fullname_field_hidden(){ if( ! bp_is_register_page() ) return; echo '<input type="hidden" name="field_1" id="field_1" value="x">'; } add_action( 'bp_core_signup_user', 'dk_bp_core_signup_user' ); /** * Sets the correct user values * * @param integer $user_id * @return void * * @author Daan Kortenbach */ function dk_bp_core_signup_user( $user_id ) { // Get user data $user = get_userdata( $user_id ); // Update xprofile fullname xprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id, $user->user_login ); // Set new user data $userdata = array( 'ID' => $user_id, 'user_nicename' => $user->user_login, 'display_name' => $user->user_login, 'nickname' => $user->user_login ); // Update user wp_update_user( $userdata ); }
and this css to Sweetdate – Styling options – Quick css
COPY CODE#field-visibility-settings-toggle-, #field-visibility-settings- { display: none; }
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.March 6, 2014 at 14:24 #12095rudik2ParticipantAbe i pasted this code from sweetdate-child/functions.php and Sweetdate – Styling options – Quick css but nothing has changed, still displays the name.
March 10, 2014 at 16:14 #12393AbeKeymastermake sure you have the child theme active and you have copied all code and haven’t missed a letter or something
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.April 4, 2014 at 04:42 #14286metalmickParticipantCopied first script fine but can’t find “css to Sweetdate – Styling options – Quick css” on my ftp.
Will this definately remove the @username tab? It’s driving me nuts!
Please advise.
April 4, 2014 at 15:11 #14326AbeKeymasterSweetdate – Styling options – Quick css it is not on your FTP, it is in your WordPress admin
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.April 4, 2014 at 15:31 #14327metalmickParticipantI did try that. Went to Appearance/editor/sweetdate but no “Styling options – Quick css” in the long list there. Am I in the right place?
April 5, 2014 at 11:47 #14372AbeKeymaster🙂 I haven’t said Appearance/editor/sweetdate, I said Sweetdate – Styling options – Quick css. Meaning that Sweetdate is a menu just like Appearance is
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.April 5, 2014 at 12:17 #14379metalmickParticipantOk got it… thanks for your patience! 🙂
I entered both exactly as you’ve shown but the @ username is still there and the functions.php script is appearing on view at the top of the website page. Am I missing brackets or something? As I said I copied the script exactly as it is.
Thanks.April 6, 2014 at 12:55 #14452metalmickParticipantBoth codes entered as you suggest but still have @ username on profile page. 🙁
April 9, 2014 at 14:54 #14674AbeKeymastermetalmick, I don’t know if you saw but this topic is not for that. It is for the register page 😉
Will be closing this topic since I gave you the answer for your @ username question in another topic you replied
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. -
AuthorPosts
The topic ‘How to get remove full name and instead use username’ is closed to new replies.