Reputation: 12940
I have the following code to generate the link to the author on a category.php page:
<?php while ( have_posts() ) : the_post(); ?>
....
<a href="<?php the_author_meta('user_url'); ?>"><?php the_author_meta( 'display_name' ); ?></a>
....
<?php endwhile; ?>
Unfortunately, the link get an empty href attribute. The display name is populated properly. I am using the latest WordPress.
Upvotes: 0
Views: 886
Reputation: 685
It is because the USER haven't provided his URL (this is author url) according to the code.
Check in Wordpress Admin > Users > All Users > choose the user and edit the URL for the particular user and check.
It will show up.
Hope this helps you.
Upvotes: 0
Reputation: 10240
That won't point to the author archive. It'll point to the author's URL as specified in their profile settings under the WP admin dashboard. So if a user hasn't provided a URL then it will be empty.
Upvotes: 1