BuddyDev

Search

[Resolved] Having name and last name in post and header

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44312

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #44335

    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

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44348
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #44361
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44379

    Hi Brajesh,

    yes you are perfectly right that problem is sync.

    Thanks a lot for your wide support,

    Giuseppe

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44678

    Hi,

    I understand is a bit complicating and time consuming issue. We will focus on it in the future. I will push the update Force button and double last name on registration form for the moment.

    Many thanks,

    Giuseppe

You must be logged in to reply to this topic.

This topic is: resolved