1. Molongui
  2. >
  3. Docs
  4. >
  5. Molongui Authorship
  6. >
  7. Shortcodes
  8. >
  9. [molongui_author_list]

[molongui_author_list]

Applies only to the Premium version of the plugin, release 1.3.5 or higher.
Get premium version

This shortcode allows you to display a list of (all) authors in your site anywhere you want.

It can be used anywhere within WordPress where shortcodes are supported. For most users, this will primarily be within the content of a WordPress post or page or the sidebar.

Each author on the list links to their author archive page and you can make them to be displayed using different layouts: as a list, as a grid, as author boxes or even as a dropdown select.

That author list can be customized making use of the optional attributes this shortcode can take.

When installing Molongui Authorship Premium, a new page named “Contributors” is added. That page makes use of this shortcode to display a list of all the authors in your site who have contributed with, at least, one content. You can edit the shortcode in there to customize the list to your liking.

Example

A trivial shortcode to display a Molongui Author List looks like this:

Editor input

[molongui_author_list]

That would display a flat authors list, showing the name of the authors as a link to their archive page. Check the image below:

Author list "flat" style.
Author list “flat” layout.

You can change how the list to display will look like by choosing between the two different layouts – “flat” and “basic”. Let’s say you want to display the list using the “basic” layout. You should use a shortcode like this one below, which will output something like in the image:

Editor input

[molongui_author_list output=list layout=basic]

Frontend output

Author list "basic" style.
Author list “basic” layout.

What about displaying an author box for each author instead of listing them? Check below how the shortcode would look like to get that:

Editor input

[molongui_author_list output=box]

Frontend output

"Complete" style list.
Author list displayed as author boxes.

What if you didn’t want to display any list like these but rather have a dropdown select your users could use to choose the author to consult? You got it! Check below:

Editor input

[molongui_author_list output=select]

Frontend output

Attributes

You can also choose between showing all authors in your site or just those registered. Check out below all the available attributes you can use to fully customize your authors list:

outputoptional
How the authors will be displayed.
Accepts "select", "list", "grid" or "box".
Defaults to list.
Available since version 3.2.5.
layoutoptional
How the authors will be arranged.
Accepts "flat" or "basic".
Defaults to flat.
Available since version 3.2.5.
typeoptional
Type of authors to list.
Accepts "authors", "users" or "guests".
Defaults to authors.
Available since version 1.3.5.
orderoptional
Designates the ascending or descending order of the "orderby" parameter.
Accepts "asc" or "desc".
Defaults to asc.
Available since version 1.3.5.
orderbyoptional
Sort retrieved authors by parameter.
Accepts "name", "first_name", "last_name", "mail", "job", "company" or "post_count.
Defaults to name.
Available since version 1.3.5.
exclude_usersoptional
Comma separated list of registered authors to exclude from being listed.
Available since version 2.0.0.
exclude_guestsoptional
Comma separated list of guest authors to exclude from being listed.
Available since version 2.0.0.
with_postsoptional
Whether to list only those authors with at least one authored post.
Accepts "yes" or "no".
Defaults to no.
Available since version 3.1.3.
countoptional
Maximum number of authors to list.
Accepts integer.
Defaults to all.
Available since version 3.2.0.
list_iconrenamedoptional
The icon to display before the author name on the flat layout template.
Accepts "feather" or "doc".
Defaults to feather.
Available since version 3.2.5.
select_idoptional
Id for the select.
Accepts text.
Available since version 3.2.5.
select_classoptional
CSS class(es) for the select.
Accepts text.
Available since version 3.2.5.
select_attsoptional
Custom attributes to add to the select tag.
Accepts text.
Available since version 3.2.5.

Deprecated attributes

Below are listed all those attributes that were available on previous versions of the plugin, but have been removed or replaced by others:

styleoptional
Layout used to display the list.
Accepts "flat", "basic" or "complete".
Defaults to flat.
Was available from version 1.3.5 to 2.3.5.
iconoptional
The icon to display before the author name on the flat style template.
Accepts "feather" or "doc".
Defaults to feather.
Was available from version 1.3.5 to 2.3.5.
Replaced by list_icon.
Was this article helpful to you? Yes No

How can we help?