Reputation: 1041
I would like to add a link on my template to link to the users own blog posts the code i have tried using is <li><a href="?author=<?php the_author_ID(); ?>">test</a></li>
.
Edit, had a typo on the code on here and the url that it takes you to is just ?author=
Upvotes: 0
Views: 99
Reputation: 175
Did you mean you want to print number only in the URL. just echo the_author_ID().
<li><a href="?author=<?php echo the_author_ID(); ?>">test</a></li>
Upvotes: 0
Reputation:
Its very simple.
you can use wordpress user list plugins instead of writing codes.
http://wordpress.org/plugins/user-list/
http://wordpress.org/plugins/wordpress-users-list/
Upvotes: 1