How to get the Author name & link in wordpress post?

How to get the Author name & link in wordpress post?

Trainee Asked on March 4, 2017 in WORDPRESS.
Add Comment
2 Answer(s)

<p>Posted by:

<?php echo get_the_author_link(); ?></p>

Team Leader Answered on March 9, 2017.
Add Comment

<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a>

Team Leader Answered on March 9, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.