WordPress:Template Tags/list authors

来自站长百科
Fludlen讨论 | 贡献2008年7月8日 (二) 15:11的版本
跳转至: 导航、​ 搜索

模板:Deprecated 模板:不支持的

Description

描述

Displays a list of the authors on a blog, and if desired, other information such as a link to each author's RSS feed.

在博客上显示一些作者的列表,如果需要的话,其它的信息,例如一个链接连接到每个作者的RSS feed。

Replace With

取代

wp_list_authors().

wp_列表_作者()

Usage

用法

%%% <?php list_authors(optioncount, exclude_admin,

                  show_fullname, hide_empty, 
                  'feed', 'feed_image'); ?> %%%

%%% <?php 列表_作者(optioncount, exclude_admin,

                  显示_全名, hide_empty, 
                  'feed', 'feed_image'); ?> %%%

Examples

例子

Default Usage

默认用法

Display the list of authors using default settings.

使用默认设置,显示一列作者。

<?php list_authors(); ?>

<?php list_authors(); ?>

Authors with Number of Posts

写了许多篇文章的作者

This example causes the site's authors to display with the number of posts written by each author, excludes the admin author, and displays each author's full name (first and last name).

这个例子使得站点的作者显示了每个作者写的许多篇文章,但是管理员作者除外,并且显示了每个作者的全名(名和姓)。

<?php list_authors(TRUE, TRUE, TRUE); ?>

<?php list_authors(TRUE, TRUE, TRUE); ?>

Harriett Smith (42)

Sally Smith (29)

Andrew Anderson (48)


Harriett Smith (42)

Sally Smith (29)

Andrew Anderson (48)

Full Name and Authors With No Posts Usage

全名和没写文章的作者 用法

Displays the site's authors without displaying the number of posts, does not exclude the admin, shows the full name of the authors, and does not hide authors with no posts. It does not display the RSS feed or image.

显示没有显示文章数目的站点的作者,不排除管理员作者,显示作者的全名,不隐藏没有写文章的作者。不显示RSS feed或者图像。

<?php list_authors(FALSE, FALSE, TRUE, FALSE); ?>

<?php list_authors(FALSE, FALSE, TRUE, FALSE); ?>

Parameters

参数

optioncount
(boolean) Display number of posts by each author. Options are:
optioncount
(boolean) 显示每个作者所写文章的数目。选项有:
  • TRUE
  • FALSE (Default)
exclude_admin
(boolean) Exclude the administrator account from authors list. Options are:
  • TRUE (Default)
  • FALSE
show_fullname
(boolean) Display the full (first and last) name of the authors. Options are:
  • TRUE
  • FALSE (Default)
hide_empty
(boolean) Do not display authors with 0 posts. Options are:
  • TRUE (Default)
  • FALSE
feed
(string) Text to display for a link to each author's RSS feed. Default is no text, and no feed displayed.
feed_image
(string) Path/filename for a graphic. This acts as a link to each author's RSS feed, and overrides the feed parameter.


  • 正确的
  • 错误的 (默认)
排除_管理员帐户
(boolean) 从作者列表上排除管理员帐户。选项有:
  • 正确的 (默认)
  • 错误的
显示_全名
(boolean) 显示作者的全名(姓/名)。选项有:
  • 正确的
  • 错误的 (默认)
隐藏_空的
(boolean) 不显示没有写文章的作者。选项有:
  • 正确的 (默认)
  • 错误的
feed
(string) 为每个作者的RSS feed显示链接的文本。默认是没有文本,不显示feed。
feed_图像
(string) 一个图形的路径/文件名。这个作为连接到每个作者的RSS feed的一个链接,而且覆盖了feed 参数。

Related

相关的

To use the query string to pass parameters to generate a list of authors, see WordPress:Template_Tags/wp_list_authors

使用查询字符串来传递参数,产生一个作者的列表,请看看模板_标签/wp_列表_作者

模板:Tag Author Tags

模板:PHP Function Tag Footer

模板:标签 作者标签

模板:PHP 函数 标签 页底文字