Hi Brajesh and thank you for your support.
I have tried and created the two fields and added the suggested snippet to hide the buddypress name function but it does not work.
Anyway this is a solution that can create, in an environment with a lot of customized code, problems that can become very difficult to manage.
So I have changed the registration page having two times the last name and so using one for the header and one for the full name using Force plugin.
The remaining issue is that Force plugin does not work properly as I have to manually update the new registration and the proposed code obviously does not work because it refers to Buddypress native full name.
/**
* Before activity post form.
*/
function buddydev_before_activity_post_form() {
add_filter( ‘bp_get_user_firstname’, ‘bp_get_loggedin_user_fullname’, 10, 2 );
}
add_action( ‘bp_before_activity_post_form’, ‘buddydev_before_activity_post_form’ );/**
* After activity post form.
*/
function buddydev_after_activity_post_form() {
remove_filter( ‘bp_get_user_firstname’, ‘bp_get_loggedin_user_fullname’, 10 );
}
add_action( ‘bp_after_activity_post_form’, ‘buddydev_after_activity_post_form’ );Is there a code to use name and last name as registered in wordpress?
Thank you very much as usual,
Giuseppe
Hi Giuseppe,
Thank you for the reply.It seems you might be using too many things to achieve a simple task.
Can you please summarise your current setup(do you have 2 field, 3 fields, 1 field for name) and share with me the complete code that you are using to enforce/update it.
Please share the code on pastebin.com and link me to allow me easily try it.
Thank you
Brajesh
You must be logged in to reply to this topic.