2

the_author_link() displays author name with hyperlink. I only want authors link to display and not authors name with hyperlink. how i suppose to do that?. thanks

3

You may consider using this function :

get_the_author_meta('url')

You can see here the implementation of the function get_the_author_link() and you will see how they construct the link with name.

-3

If you want to print the URL of author, you can try this.

$authorLink = get_author_link();                
echo $authorLink;

Hope this will help.

Thanks.

Updated on 1st Nov,2017.

In my above solution, get_author_link() is deprecated for latest version of Wordpress.

You can get the any details of users by get_the_author_meta() method. In this function you need to pass the meta_key which you want to get.

  • 2
    this function is now deprecated in current WordPress version. – mmm Oct 28 '17 at 8:10

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.