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);
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.
get_author_link($user_id);
<a href=<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>">Author Name</a>