Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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);
share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I believe the function you want is get_author_posts_url.

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

Your Answer

 
discard

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.