WordPress函数:the_author_posts_link 显示当前作者页面的链接

江河/ 2023年05月04日/ WordPress/ 浏览 792

函数原型:


the_author_posts_link( string $deprecated = '' )


显示指向当前文章作者的作者页面的HTML链接。


函数源码:


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


函数 the_author_posts_link 是通过调用 get_the_author_posts_link 来实现的。可以参考函数 get_the_author_posts_link


使用举例:


显示链接,链接文本值作为用户的“显示名称”。


<p>Other posts by <?php the_author_posts_link(); ?></p>


发表评论

暂无评论,抢个沙发...

客服 工单