WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
up vote 0 down vote accepted

I believe the function you want is get_author_posts_url.

share|improve this answer
<a href=<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>">Author Name</a>
share|improve this answer
An explanation could change this code fragment into an answer. – toscho Dec 22 '12 at 2:23

Your Answer


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

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