Have you checked the database for User’s url. Maybe that’s what they used for registering.
What about this scenario –
- For admin, the default value of url is the blog url.
- User ID 2 used a url when registering.
- User ID 3 kept the url field blank when registering.
You should fist check their url from the database. It resides in wp_users
table(I am assuming that you have used the table prefix wp_
).
EDIT:
the_author_posts_link()
and the_author_meta('user_url',$userID)
have different functionality.
the_author_posts_link()
display displays a link to all posts by an author.
the_author_meta('user_url',$userID)
displays their homepage url.
So, these are two different things. I think your best bet is to use the following to get what you are trying to achevie instead of the_author_meta('user_url', $userID)
. You can’t also use the_author_posts_link
as it takes no argument and have to be used inside The Loop:
<a href="https://wordpress.stackexchange.com/questions/128960/<?php echo get_author_posts_url( $author->ID ); ?>"><?php the_author_meta( 'display_name', $author->ID ); ?></a>