get_the_author()

介绍

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(); ?>

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注