WordPress at a glance

the_author_posts_link() WP 1.2.0

Displays HTML link (<a> tag) to the archive page of the author of the current post. The text of the link will be the name of the author.

Typically used inside The Loop

✈ 1 time = 0.000012s = very fast | 50000 times = 0.01s = speed of light | PHP 7.1.2, WP 4.7.3

No Hooks.

Return

Null. Nothing.

Usage

the_author_posts_link( $deprecated );
$deprecated(string)
Unused.
Default: ''

Examples

#1 Output a link to the author's archive page. The author's name become the link text:

<p>Other posts of the author: <?php the_author_posts_link(); ?></p>

Output:

<p>Other posts of the author: <a href="/author/kama" title="Posts by Kama" rel="author">Kama</a></p>

Changelog

Since 1.2.0 Introduced.
Since 4.4.0 Converted into a wrapper for get_the_author_posts_link()

Code of the author posts link: wp-includes/author-template.php WP 5.2.4

<?php
function the_author_posts_link( $deprecated = '' ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '2.1.0' );
	}
	echo get_the_author_posts_link();
}

Related Functions

From tag: Link (tag A in HTML)

More from category: Other

More from Template Tags: Authors

No comments
    Hello, !     Log In . Register