wordpress标签wp list authors使用方法详解

-用途描述: 展示一个博客作者(使用者)的列表,如果使用者写作某些文章,那么这个链接向那些文章的作者名字就可以显示。可以用这个标签显示每个作者的文章统计和rss链接。 -使用方法: <?wp_list_authors( $args ); ?> -默认使用方法: <?php $args = array(  ‘optioncount’ => false, 不显示文章数量; ‘exclude_admin’ => true, 从列表里排除adm...

-用途描述:
展示一个博客作者(使用者)的列表,如果使用者写作某些文章,那么这个链接向那些文章的作者名字就可以显示。可以用这个标签显示每个作者的文章统计和rss链接。
-使用方法

<?wp_list_authors( $args ); ?>

-默认使用方法

<?php $args = array( 

‘optioncount’ => false, 不显示文章数量;

‘exclude_admin’ => true, 从列表里排除admin;

’show_fullname’ => false, 显示作者”公开名字为”;

‘hide_empty’ => true, 排除没有文章的作者;

‘echo’ => true, 显示结果;

‘feed’ => , 无作者feed文本;

‘feed_image’ => , 无作者feed图像;

’style’ => list, 以列表形式;

‘html’ => ); ?> 各项以有效html返回;

-参数:

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

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

    (布尔)显示发表文章数量,1(显示),0(不显示-默认)

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

    * 1 (true) – default
    * 0 (false)
    (布尔)从作者列表中排除admin(登录者),1(排除-默认),0(不排除)

  • show_fullname(boolean) Display the full (first and last) name of the authors. If false, the “Display name publicly as” is displayed. Options are:

    * 1 (true)
    * 0 (false) – default
    (布尔)显示作者全名,如果不,则“公开名字为”。1(显示),0(不-默认)

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

    * 1 (true) – default
    * 0 (false)
    (布尔)不显示没有文章的作者。1(不显示-默认),0(显示)

  • echo (boolean) Display the results. Options are:

    * 1 (true) – default
    * 0 (false)
    (布尔)显示结果。1(显示-默认),0(不显示)

  • feed (string) Text to display for a link to each author’s RSS feed. Default is no text, and no feed displayed.
    (字符串)链接到每个作者的rss feed的文本。默认是没有文本,没有feed显示。
  • feed_image(string) Path/filename for a graphic. This acts as a link to each author’s RSS feed, and overrides the feed parameter.
    (字符串)一个图像的路径/文件名。它链接到每个作者的rss feed并覆盖feed参数。
  • style (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不可用,这个选项被忽略。这个选项已被加入到2.8版。

  • html (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)
    (布尔)以html列出各项,或者以普通文本。默认为以html列出。如果html不可用,列表样式忽略且各项返回,以逗号间隔。该选项已加入2.8版。
    -例子:

    <?php wp_list_authors(’show_fullname=1&optioncount=1′); ?>

    这个例子列表显示网站的作者全名和每个作者的文章数。同时默认排除了admin作者,隐藏了没有文章的作者,没有显示rss feed和其图像。

  • 转载请注明文章转载自:网站前端,web前端,前端脚本,前端优化|时代前端 [http://www.52shidai.com]
    本文链接地址:wordpress标签wp list authors使用方法详解

    标签:, , ,

    发表评论

    *

    * 绝不会泄露



    Copyright © 网站前端,web前端,前端脚本,前端优化|时代前端 and WPYOU All Rights Reserved.

    Powered by Wordpress and Theme by WPYOU