On this page:



The authors tag is a single or container tag that Textpattern will use to gather a list of authors designated within the Textpattern Users administration panel.

If used as a container tag, it must be specified as an opening and closing pair of tags, like this:

    ...contained statements...


Tag will accept the following attributes (case-sensitive):

form="form name"
Use specified form template to process each author.
Default: unset.
group="user group"
Comma-separated list of user groups (publishing roles that the authors belong to.
Values: publisher, managing_editor, copy_editor, staff_writer, freelancer, designer or privs_none.
Default: unset, retrieves from all groups.
The number of authors to display.
Default: 0 (no limit).
Comma-separated list of author names.
Default: unset, which determines whether ‘any’ author listing is being viewed.
The number of authors to skip.
Default: 0.
sort="sort value(s)"
How to sort resulting list.
id (author id#).
last_access (most recent log in).
name (login name).
realname (real name).
privs (user group).
rand() (random).
Each field in the textpattern database table can be used as a sort key.
Default: name asc.

Common presentational attributes

These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.

Where value is an HTML element, specified without brackets (e.g. break="li") or some string to separate list items.
Default: br (but see break cross-reference for exceptions).
class="class name"
HTML class to apply to the wraptag attribute value.
Default: tag name or unset (see class cross-reference).
Label prepended to item.
Default: unset (but see label cross-reference for exceptions).
HTML element to wrap (markup) label, specified without brackets (e.g. labeltag="h3").
Default: unset.
HTML element to wrap (markup) list block, specified without brackets (e.g. wraptag="ul").
Default: unset (but see wraptag cross-reference for exceptions).


Example 1: List all authors

<txp:authors />
<txp:authors group="publisher, managing_editor" wraptag="ul" break="li">
    <txp:author link="1" />
    (<txp:author_email />)

Other tags used: author, [author_email.

Example 3: Render a drop-down list of authors

<select name="author">
    <txp:authors sort="realname asc">
        <option value="<txp:author />"><txp:author /></option>

Other tags used: author.


Version 4.6.0

Tag support added.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.