Function Reference/the author

来自WordPress中文文档
跳转至: 导航搜索

wordpress.org.cn

Description

The author of a post can be displayed by using this Template Tag. This tag must be used within The Loop.

To return to PHP rather than displaying, use get_the_author.

Usage

%%% <?php the_author(); ?> %%%

Examples

Display Author's 'Public' Name

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

<p>This post was written by <?php the_author(); ?></p>

Parameters

$post-id (integer).

Related

the_author, the_author_link, get_the_author_link, the_author_meta, the_author_posts, the_author_posts_link, wp_dropdown_users, wp_list_authors

includeonlydiv style=clear:both; background-color:#F7F7F7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;See also index of Function Reference and index of Template Tags./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 检查到模板循环:模板:Message /pre

Result

检查到模板循环:模板:Message

/noinclude