wordpress根据ID获取作者文章页面

付费节点推荐


免费节点


节点使用教程


Description

Gets the URL of the author page for the author with a given ID.

Usage

<?php get_author_posts_url( $author_id, $author_nicename ); ?>

Parameters

$author_id
(integer) (required) ID of the author whose URL should be retrieved.

Default: None
$author_nicename
(string) (optional) User nicename.

Default: empty

Return Values

(string) 
The URL to the author’s page.

Examples

Display the link of the author page for the author of the current post

<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a>

Source File

get_author_posts_url() can be located in wp-includes/author-template.php

未经允许不得转载:Bcoder资源网 » wordpress根据ID获取作者文章页面

相关推荐

更多优质资源关注微信公众号: bcoder

bcoder
赞 (1)
分享到:更多 ()

评论 0

评论前必须登录!

登陆 注册