function get_the_author_link() {}

Retrieve either author’s link or author’s name.
If the author has a home page set, return an HTML link, otherwise just return the author’s name.

Source code

function get_the_author_link() {

	if ( get_the_author_meta('url') ) {

		return '<a href="' . get_the_author_meta('url') . '" title="' . esc_attr( sprintf(__("Visit %s’s website"), get_the_author()) ) . '" rel="external">' . get_the_author() . '</a>';

	} else {

		return get_the_author();




No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: