Warning: This function has been deprecated. Use get_author_posts_url() instead.

get_author_link() WordPress Function

The get_author_link() function in WordPress allows you to get the author's link for the current post. This is useful for displaying the author's name with a link to their website or blog.

get_author_link( bool $display, int $author_id, string $author_nicename = '' ) #

Returns or Prints link to the author’s posts.


Description

Top ↑

See also


Top ↑

Parameters

$display

(bool)(Required)

$author_id

(int)(Required)

$author_nicename

(string)(Optional)

Default value: ''


Top ↑

Return

(string|null)


Top ↑

Source

File: wp-includes/deprecated.php

function get_author_link($display, $author_id, $author_nicename = '') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );

	$link = get_author_posts_url($author_id, $author_nicename);

	if ( $display )
		echo $link;
	return $link;
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use get_author_posts_url()
1.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More