I've assigned a specific html page (let's call it an author bio page) to each user in the 'website' field within the user admin area. How do I get that URL to display within a single page post? I'm assuming that I'm to use $curauth->user_url but it returns a blank page.


you need to assign $curauth and since you are not on an author archive but on a regular page you can use get_userdata function and pass the user ID like so:

$curauth = get_userdata(1);
//and then use 
echo $curauth->user_url;

or if you are in the loop you can use the_author_link(); which will Displays the author's Website URL as a link and the text for the link is the author's Profile Display name publicly as field.

  • Thank you, Bainternet! You have helped me tremendously on this and other issues and I really appreciate you explaining the reason behind your solution so that I'm better able to help myself by understanding the reasons why. I love this forum! – mktggirl May 20 '11 at 15:42
  • Glad i could help. – Bainternet May 20 '11 at 19:10

use the_author_link:

<?php the_author_link(); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.