Dolores DeGiacomo
asked 8 years ago

Whenever I write a blog the author name comes up as my login name. I would like the name to be either mine or the name of one of my guest writers. How can I do that? I’m not seeing a space anywhere to make such a change. Thanks.

1 Answers
DominicStaff
answered 8 years ago

You can try the following steps:
1) Login into wordpress admin area.
2) Click on Edit in the Posts section.
3) Select the posts for which you need to edit the author details.
4) From the top there is drop down for bulk actions -> select edit and apply.
5) Now, you can change author, comment, status, pings, sticky, categories etc..,
6) After changing the value of author..click on update posts..
Hope this helps !

doloresad
replied 8 years ago

Thank you. I did exactly as you instructed…I clicked update and when I refreshed my webpage it still shows the login name. I went back to the post and the change is not there. I don’t know what’s happening. I’ll be responding to your other answer with my login info. and hopefully we can get this all corrected.
Thanks.

dominic Staff
replied 8 years ago

Hi,
About this issue, you can change in the Dashboard > User > Display name publicly as select-box, you can select the First name or last name that you want to display for user.

Or you can add the following code to the functions.php file:

Sets the user’s display name (always) to first name last name, when it’s avail.

add_action ('admin_head','make_display_name_f_name_last_name');
function make_display_name_f_name_last_name(){

$users = get_users(array('fields'=>'all'));

foreach($users as $user){
    $user = get_userdata($user->ID);    

    $display_name = $user->first_name . " " . $user->last_name;

    if($display_name!=' ') wp_update_user( array ('ID' => $user->ID, 'display_name' => $display_name) );
        else wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );

    if($user->display_name == '')
        wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );
}
}

Sets the user’s display name (always) to first name, when it’s avail.

add_action ('admin_head','make_display_name_f_name_last_name');
function make_display_name_f_name_last_name(){

$users = get_users(array('fields'=>'all'));

foreach($users as $user){
    $user = get_userdata($user->ID);    

    $display_name = $user->first_name;

    if($display_name!=' ') wp_update_user( array ('ID' => $user->ID, 'display_name' => $display_name) );
        else wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );

    if($user->display_name == '')
        wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );
}
}

Sets the user’s display name (always) to last name, when it’s avail.

add_action ('admin_head','make_display_name_f_name_last_name');
function make_display_name_f_name_last_name(){

$users = get_users(array('fields'=>'all'));

foreach($users as $user){
    $user = get_userdata($user->ID);    

    $display_name = $user->last_name;

    if($display_name!=' ') wp_update_user( array ('ID' => $user->ID, 'display_name' => $display_name) );
        else wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );

    if($user->display_name == '')
        wp_update_user( array ('ID' => $user->ID, 'display_name' => $user->display_login) );
}
}

Hope this helps !

doloresad
replied 8 years ago

Dominic,

I don’t know why my luck is so bad here. I first pasted that code into the functions.php section as you recommended…nothing changed. Then I cut it out of there and pasted it into the custom css section…still no change. I have no idea why this code will not update my author name. Plus, my name is there, in the user section and is set to be the author name. On the post page my full name is listed as the author but on the front page, when you open the post, the author name is still my login. Please help, I’ve followed all the rules from the guide, I’ve done everything you’ve instructed and I’m going to give up soon.

BTW, thank you for fixing my bio section, that was a big help.

doloresad
replied 8 years ago

PS, just to be sure, I deleted the old article and republished it today…author name still my login.

dominic Staff
replied 8 years ago

Please send me username & password of your site (via private answer) I will help you check and resolve it.

doloresad
replied 8 years ago

Hi, I sent that to you from the other thread…where you corrected my bio and fixed my menu.

dominic Staff
replied 8 years ago

I have checked and fixed some your issue and you can follow your question here: http://www.designwall.com/question/my-file-does-not-have-a-quickstart-folder/

Powered by DW Question & Answer Pro