Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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
add comment

use the_author_link:

<?php the_author_link(); ?>
share|improve this answer
    
Thank you Milo! –  mktggirl May 20 '11 at 16:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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