- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「テンプレートタグ/the author」の版間の差分
提供: WordPress Codex 日本語版
< テンプレートタグ
細 (2 版) |
(get_the_author へリンク (23:43, 26 March 2010 Nubloo 版に更新)、差分リンク挿入) |
||
1行目: | 1行目: | ||
+ | {{テンプレートタグガイド|}} | ||
+ | |||
<div id="Description"> | <div id="Description"> | ||
== 説明 == | == 説明 == | ||
</div> | </div> | ||
− | このテンプレートタグ '''<code>the_author</code>''' は、記事の投稿者名を表示します。このタグは [[ | + | このテンプレートタグ '''<code>the_author</code>''' は、記事の投稿者名を表示します。このタグは [[The Loop|ループ]]内でのみ使えます。 |
+ | |||
+ | 表示するのではなくPHPに値を返したいときは、[[テンプレートタグ/get_the_author|get_the_author]]/[[:en:Template Tags/get_the_author|en]] を使います。 | ||
<div id="Usage"> | <div id="Usage"> | ||
21行目: | 25行目: | ||
使用例: | 使用例: | ||
− | + | <pre><p>この記事の投稿者: <?php the_author(); ?></p></pre> | |
表示結果: | 表示結果: | ||
32行目: | 36行目: | ||
このタグにパラメータはありません(廃止されました)。 | このタグにパラメータはありません(廃止されました)。 | ||
+ | |||
+ | {{原文|Template Tags/the author|84843}}<!-- 23:43, 26 March 2010 Nubloo 版 --> | ||
<div id="Related"> | <div id="Related"> | ||
41行目: | 47行目: | ||
{{No Param Tag Footer}} | {{No Param Tag Footer}} | ||
− | {{DEFAULTSORT: | + | {{DEFAULTSORT:The_author}} |
[[en:Template Tags/the_author]] | [[en:Template Tags/the_author]] |
2010年4月2日 (金) 00:11時点における版
タグ一覧: テンプレートタグ | インクルードタグ | 条件分岐タグ | その他の関数 | Code Reference
使い方: テンプレートタグ入門 | パラメータの渡し方 | 初心者の方へ | その他のテーマ関連資料
このテンプレートタグ the_author
は、記事の投稿者名を表示します。このタグは ループ内でのみ使えます。
表示するのではなくPHPに値を返したいときは、get_the_author/en を使います。
使い方
<?php the_author(); ?>
用例
記事の投稿者の「ブログ上の表示名」を表示する
記事の投稿者がプロフィールの「ブログ上の表示名」として指定した値を表示します。
使用例:
<p>この記事の投稿者: <?php the_author(); ?></p>
表示結果:
この記事の投稿者: James Smith
パラメータ
このタグにパラメータはありません(廃止されました)。
最新英語版: WordPress Codex » Template Tags/the author (最新版との差分)
関連
作成者タグ:
the_author(),
get_the_author(),
the_author_link(),
get_the_author_link(),
the_author_meta(),
get_the_author_meta(),
the_author_posts(),
get_the_author_posts(),
the_author_posts_link(),
get_author_posts_url(),
get_the_modified_author(),
the_modified_author(),
wp_dropdown_users(),
wp_list_authors()
関数リファレンス、テンプレートタグ目次もご覧ください。