the_author - WordPress*リファレンス
このTemplate Tagを使用することによって、ポストの作者を表示することができます。
Loopの中でこのタグを使用しなければなりません。
⇒The author of a post can be displayed by using this Template Tag. This tag must be used within The Loop. –Template Tags/the author ? WordPress Codex
ディスプレイ作者の’公開’の名前
フィールドに公的ユーザのDisplay nameの値を表示します。
⇒Displays the value in the user’s Display name publicly as field.
This post was written by <?php the_author(); ?>
タグ使用方法
<?php the_author(); ?>
引数
⇒This function takes no arguments. (The arguments have been deprecated.)
idmode
nickname
ニックネームで表示します。
login
ログイン名で表示します。
firstname
ファーストネームで表示します。
lastname
ラストネームで表示します。
namefl
ファーストネーム・ラストネームの順で表示します。
namelf
ラストネーム・ファーストネームの順で表示します。
display
trueで画面に出力され、falseで値を返します。初期値はtrueです。
使用例
<!–通常の使い方–>
<div class="meta">
<?php _e("Filed under:"); ?>
<?php the_category(','); ?> - <?php the_author(); ?>
</div>
<!–フルネーム表示に固定–>
<div class="meta">
<?php _e("Filed under:"); ?>
<?php the_category(','); ?> - <?php the_author('namelf'); ?>
</div>
関連テンプレートタグ
the_author,the_author_description, the_author_login, the_author_firstname, the_author_lastname, the_author_nickname, the_author_ID, the_author_email, the_author_url, the_author_link, the_author_icq, the_author_aim, the_author_yim, the_author_msn, the_author_posts, the_author_posts_link, list_authors, wp_list_authors



