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.000012 sec (very fast) | 50000 times — 0.01 sec (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.

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 5.7.2

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

From tag: Link (tag A in HTML)

More from category: Other

More from Template Tags: Authors

No comments
    Log In