wp_list_authors

Sponsored Link

リストを表示するブログの作者(ユーザ) 、およびユーザーが作成した場合、すべての投稿には、その作者の名前は自分の投稿へのリンクとして表示されます。

Sponsored Link

Displays a list of the blog’s authors (users), and if the user has authored any posts, the author name is displayed as a link to their posts. Optionally this tag displays each author’s post count and RSS feed link.

wp_list_authorsのテンプレートタグ使用方法

<?php wp_list_authors( $args ); ?> 

wp_list_authorsのデフォルトの使い方

<?php $args = array(
    'optioncount'   => false, 
    'exclude_admin' => true, 
    'show_fullname' => false,
    'hide_empty'    => true,
    'echo'          => true,
    'feed'          => [empty string], 
    'feed_image'    => [empty string],
    'style'         => list,
    'html'          => [empty string] ); ?> 

既定の設定を使用して、作者のリストを表示してください。

デフォルトでは、使用方法を示します:

  • 表示されないの数のカウントの投稿
  • ‘管理者’の作者のリストから除外
  • 完全な名前が表示されない(最初と最後)だが、作者のニックネームが表示されます
  • 除外していないユーザーの投稿
  • 著者のテキストが表示されていないフィード
  • 画像が表示されていない著者フィード

By default, the usage shows:

  • Does not display the count of the number of posts
  • Excludes the ‘admin’ author from the list
  • Does not display the full name (first and last) but displays the author nickname
  • Excludes users with no posts
  • No author feed text is displayed
  • No author feed image is displayed

wp_list_authorsのパラメーター

optioncount

(論理演算子) 各作者から発行されたポストの数を表示してください。
オプションは以下の通りです。

(boolean) Display number of published posts by each author. Options are:

  • 1 (true)
  • 0 (false – this is the default)

exclude_admin

(論理演算子) 作者リストから’admin'(ログインはadminである)アカウントを除いてください。

オプションは以下の通りです。

(boolean) Exclude the ‘admin’ (login is admin) account from authors list. Options are:

  • 1 (true – this is the default)
  • 0 (false)

show_fullname

(論理演算子) 作者の完全な(最初と最後)名前を表示。
誤っているなら、あだ名を表示します。
オプションは以下の通りです。

(boolean) Display the full (first and last) name of the authors. If false, the nickname is displayed. Options are:

  • 1 (true)
  • 0 (false – this is the default)

hide_empty

(論理演算子) 0つのポストがある作者を表示しない。
オプションは以下の通りです。

(boolean) Do not display authors with 0 posts. Options are:

  • 1 (true – this is the default)
  • 0 (false)

echo

(boolean)結果を表示。オプションがあります:

(boolean) Display the results. Options are:

  • 1 (true) – default
  • 0 (false)

feed

(string) 各作者のRSS配信へのリンクに表示するテキスト。

デフォルトはテキストではありません、そして、配信は全く表示しませんでした。

(string) Text to display for a link to each author’s RSS feed. Default is no text, and no feed displayed.

feed_image

(string) グラフィックのパス/ファイル名。それぞれの著者のRSSフィードへのリンクとして、この役割を果たし、フィードのパラメータを上書きします。

(string) Path/filename for a graphic. This acts as a link to each author’s RSS feed, and overrides the feed parameter.

style

(string)著者リストを表示するスタイル。
リストの値は、デフォルトでは、順不同リストとして著者が表示され、どれも特別な表示方法を生成します(リストアイテムは、コンマによって区切られます)。
htmlがfalseの場合、このオプションは無視されます。このオプションは、バージョン2.8で追加されました。有効な値:

(string) Style in which to display the author list. A value of list, the default, displays the authors as an unordered list, while none generates no special display method (the list items are separated by comma). If html is false, this option is ignored. This option was added with Version 2.8. Valid values:

  • list – default.
  • none

html

(boolean)HTMLかプレーンテキスト内かどうかは、アイテムを一覧表示します。デフォルトの設定はtrueです。 htmlがfalseの場合、スタイル設定が無視され、アイテムは、カンマで区切って返されます。
このオプションは、バージョン2.8で追加されました。有効な値:

(boolean) Whether to list the items in html or plaintext. The default setting is true. If html is false, the style setting is ignored and the items are returned, separated by comma. This option was added with Version 2.8. Valid values:

  • 1 (true) – default
  • 0 (false)

記事の著者名と投稿数を載せる方法

この例では、各著者の投稿の数に加えてフルネーム(姓名)でサイトの作者のリストが表示されます。また、デフォルトによって、管理者を除いたり、記事を書いていない作者を非表示にしたり、RSSフィードや画像を表示しません。

This example displays a list of the site’s authors with the full name (first and last name) plus the number of posts for each author. Also, and by default, it excludes the admin author, hides authors with no posts, and does not display the RSS feed or image.

<?php wp_list_authors('show_fullname=1&amp;optioncount=1'); ?>

harriett(42)
Sally Smith (29)
Andrew Anderson (48)

変更ログ

  • Since: 1.2.0
  • 2.8.0 : Added the ‘style’ and ‘html’ parameters.

ソースファイル

wp_list_authors()はwp-includes/author-template.php内に位置しています。

wp_list_authors() is located in wp-includes/author-template.php.

関連テンプレートタグ

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

wp_list_authors, wp_list_categories, wp_list_pages, wp_list_bookmarks, wp_list_comments, wp_get_archives, wp_page_menu, wp_dropdown_pages, wp_dropdown_categories, wp_dropdown_users

Sponsored Link