Author website URL

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.

Related posts

Leave a Reply

2 comments

  1. 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.