Display both First and Last Name Everywhere

Hello,

I tried a few snippets from other posts. I am trying to display both the first and last name everywhere a vendor and/or listing is shown.

trying this code for now:

function my_expert_full_name( $name, $user_id ) {
    $first_name = get_the_author_meta( 'first_name', $user_id );
    $last_name  = get_the_author_meta( 'last_name', $user_id );
    return trim( $first_name . ' ' . $last_name );
}
add_filter( 'hivepress/expert/name', 'my_expert_full_name', 10, 2 );
add_filter( 'hivepress/vendor/name', 'my_expert_full_name', 10, 2 );

thank you

Hi,

Sorry for the delay. Please navigate to HivePress > Settings > Users > Display Name and specify the Full Name there. After that, go to WordPress Dashboard > Users > open the vendor user and save the changes. Then you should see the full name displayed.

​I hope this is helpful to you

1 Like

Solved. Thank you very much

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.