4

How can I retrieve the permalink to a user (author) profile dynamically outside the loop by ID?

an alternative to the_author_link(), but for outside the loop.

Example:

get_author_link($user_id);

2 Answers 2

3

I believe the function you want is get_author_posts_url.

2
<a href=<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>">Author Name</a>
1
  • 6
    An explanation could change this code fragment into an answer.
    – fuxia
    Dec 22, 2012 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.