我要投稿 | 网站地图 WordPress建站学习平台
WordPress教程网
热门标签: wordpress教程 wordpress函数 wordpress WordPress建站 wordpress插件

图文教程

当前位置:首页> 图文教程

WordPress函数get_the_author()

发布:WordPress教程网   发布时间: 2023-02-06  游览次数:30次

介绍

get_the_author() 用于显示文章作者的名称的函数,必须使用在 the_loop 循环中。

使用

<?php $author = get_the_author(); ?>

参数

$deprecated
(string) (optional) Deprecated.
Default: ''

Returns
(string)
The author's display name.

示例

Grab the Author's 'Public' Name

Grabs the value in the user's Display name publicly as field.

<?php $author = get_the_author(); ?>

本文版权归原作者所有,转载请注明原文来源出处, WordPress教程网 感谢您的支持!

本文链接: http://www.wpcn.net/822.html

WordPress教程网
WordPress教程网
相关内容