-
AuthorPosts
-
October 26, 2014 at 11:03 pm #341168
It is possible to change the author name (alias)?
I have translated an article and I want to display that author name instead my name on the article author field.
Thanks in advance!-
This topic was modified 11 years, 1 month ago by
iostar.
October 28, 2014 at 7:05 am #342033Hey iostar!
Thank you for using Enfold.
You can edit the author name on the Users panel. Set the Display name publicly as option.
Regards,
IsmaelOctober 28, 2014 at 7:31 am #342050Thanks for your reply!
I wanted to display my name too on other articles that I wrote, so, if I change my name will be globally changed.
Searching the web, I found something that works somehow, but in case of a new update, I have to rewrite the functions.php in the theme.
The code is this:add_filter( 'the_author', 'guest_author_name' ); add_filter( 'get_the_author_display_name', 'guest_author_name' ); function guest_author_name( $name ) { global $post; $author = get_post_meta( $post->ID, 'guest-author', true ); if ( $author ) $name = $author; return $name; } if( !is_admin() ) { add_filter( 'author_link', 'my_author_url' ); } function my_author_url( $url ) { global $post; if( get_post_meta($post->ID, 'guest-author', true) ) { if( get_post_meta($post->ID, 'guest_author_url', true) ) { return esc_url( get_post_meta($post->ID, 'guest_author_url', true) ); } else { return ''; } } return $url; }If you have another idea, please share.
Thanks!October 28, 2014 at 4:46 pm #342307Hi!
You can use a child theme to avoid that. Please see – http://kriesi.at/documentation/enfold/portfolio-item/create-a-child-theme/
You can also download pre-built child theme here – http://kriesi.at/documentation/enfold/downloads/Regards,
YigitOctober 30, 2014 at 3:25 pm #343438Many thanks for your idea. Now I am not afraid of loosing my customizations.
Keep up the good work! -
This topic was modified 11 years, 1 month ago by
-
AuthorPosts
- The topic ‘How to change author name (alias)’ is closed to new replies.
