Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #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 10 years, 2 months ago by iostar.
    #342033

    Hey iostar!

    Thank you for using Enfold.

    You can edit the author name on the Users panel. Set the Display name publicly as option.

    Regards,
    Ismael

    #342050

    Thanks 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!

    #342307

    Hi!

    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,
    Yigit

    #343438

    Many thanks for your idea. Now I am not afraid of loosing my customizations.
    Keep up the good work!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to change author name (alias)’ is closed to new replies.