• Resolved link1921u

    (@link1921u)


    Hi! My question is easy, is there any way I can convert users to authors? I just want to show their user’s nick as it appears on the page that I attach

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    You’ll need a user role editor plugin if you need to change the user’s role to “Author”.

    I just want to show their user’s nick as it appears on the page that I attach

    We can filter the author link on the post meta to display the user’s nickname using this PHP snippet:

    add_filter( 'generate_post_author_output', function( $output ) {    
        $nickname = esc_html( get_the_author_meta('nickname') );
        $author_link = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
        $new_author = '<a href="'.$author_link.'">'.$nickname.'</a>';
        return $new_author;
    } );
    Thread Starter link1921u

    (@link1921u)

    Thanks!!!!!!

    No problem. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show users as author’ is closed to new replies.