如何利用wordpress中的函数获取当前作者页面的链接url,下面web建站小编给大家简单介绍一下关于get_the_author_posts_link()函数的基本用法!
函数原型:
get_the_author_posts_link(): string
函数源码:
function get_the_author_posts_link() {
global $authordata;
if ( ! is_object( $authordata ) ) {
return '';
}
$link = sprintf(
'<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
/* translators: %s: Author's display name. */
esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
get_the_author()
);
return apply_filters( 'the_author_posts_link', $link );
}
包含钩子:
apply_filters( 'the_author_posts_link', string $link )
使用举例:
echo get_the_author_posts_link();
wordpress建站如何快速提交和优化您的网站(IndexNow插件)?
上面是“wordpress如何获取当前作者页面的链接url”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_4403.html
workflows工作流
stvmccrr风格的玫瑰花ComfyUI工作流
一辆老式灵车在黑暗中从雾中出现ComfyUI工作流
一个冰淇淋ComfyUI工作流
一个可爱的口袋妖怪ComfyUI工作流
在月球上穿着太空服的宇航员
一个浑身皮毛看起来像丘巴卡的3d动漫人物
一朵染血的白玫瑰ComfyUI工作流
一棵树从鸟笼里长出来的梦幻般场景
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

日历设置每个月颜色都不一样
canvas空间文本射线
HTML5 Canvas 刻度尺
jquery鼠标滑过图片边框特效(jquery.focus-follow插件)
js导出excel插件(兼容mac电脑Numbers表格)
数字滚动效果(兼容IE6/IE8)
利用css3做一个动态loading效果










