03 Research and Documentation Author Functions

Link back to Main Page

the_author() function

the "the_author" function is a function that allows you to display the name of the author on a given post. It can also be used to either echo or return the author name, as it is backwards compatible with the "get_the_author()" function.

the_author_link() Function

the "the_author_link()" function is a function with two purposes. Either it repeats the exact same thing the "the_author" function does above by showing the name of the author, or it will link to a given homepage if the author that is being referenced has a homepage available.

Similarities and Differences

The key similarity between these two functions is that if no special parameters are set, they both return the name of the author that wrote a given post. However, if the author has a link to a homepage in their account, then the second function will return a link as well as the author name.

Summary

In summary, we talked about two different functions. The first displays the author of a given post. The second will do the same, but will also display the author's home page if they have one.