如何利用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工作流
去掉背景(抠图)comfyui工作流
一把令人难忘的美丽吉他ComfyUI工作流
一个表情深思熟虑的成熟男人
一只竹节虫ComfyUI工作流
荷塘月色ComfyUI工作流
一座巨大的野兽派建筑漂浮在热带风景中的贫民
一位身穿金色铠甲的美丽女子守卫在寺庙外
一个戴着破旧莎帽子的机械忍者站在冰林中
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

canvas经线动画走到效果
css3绘制一个会动的大嘴鸟
纯html+css做一个3d统计效果
css3搭积木叠加图形
会议人员60s签到倒计时插件
利用js做一个炫酷音乐背景效果
3d文字动画效果
如何利用css3+js做一个下雨效果











