[molongui_author_list]

Molongui » Help » Molongui Authorship Docs » Shortcodes » [molongui_author_list]

This shortcode allows you to easily 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.

Different layouts are available, so you can make authors display in a:

Dev Tip

None of the available layouts suit your needs? Check this article out on how to provide your own custom template to display the authors list.

You can narrow which authors to display based on their user role, author type or even handpick them. Exclusion list is also accepted!

And you can customize which author data to display —avatar, name, email, phone, position, bio and/or social links— and their order.

Each author on the list links to their author archive page.

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

When installing Molongui Authorship Pro, a new page named Contributors is added. It makes use of this shortcode to list 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:

Flat list 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

Basic list 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

Author Box layout

When displaying the list as author boxes, authors whose “Display the author box for this author” setting is disabled won’t be listed.

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

[molongui_author_list output=select type=guests exclude_guests=”3338,309″ ]

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 1.0.0.
layoutoptional
Authors list style. Applies only if selected output is “list”
Accepts “flat” or “basic”.
Defaults to flat.
Available since version 1.0.0.
columnsoptional
Number of columns in the grid. Applies only if output=grid
Accepts integer.
Defaults to 4.
Available since version 1.5.0.
grid-edge-gapoptional
Space along the edge of the grid container. Applies only if output=grid
Accepts any non-negative, length value.
Defaults to 0px.
Available since version 1.5.0.
grid-row-gapoptional
Space to add between grid rows. Applies only if output=grid
Accepts any non-negative, length value.
Defaults to 20px.
Available since version 1.5.0.
grid-column-gapoptional
Space to add between grid columns. Applies only if output=grid
Accepts Any non-negative, length value.
Defaults to 20px.
Available since version 1.5.0.
grid-item-paddingoptional
Grid item inner padding. Applies only if output=grid
Accepts any non-negative, length value.
Defaults to 0px.
Available since version 1.5.0.
grid-item-coloroptional
Grid item background color. Applies only if output=grid
Accepts CSS color values.
Defaults to transparent.
Available since version 1.5.0.
grid-item-border-widthoptional
Grid item border width. Applies only if output=grid
Accepts any non-negative, width value.
Available since version 1.5.0.
grid-item-border-styleoptional
Grid item border style. Applies only if output=grid
Accepts solid, dashed, dotted, double, groove, ridge, inset, outset.
Available since version 1.5.0.
grid-item-border-coloroptional
Grid item border color. Applies only if output=grid
Accepts CSS color values.
Available since version 1.5.0.
grid-item-border-radiusoptional
Grid item border radius. Applies only if output=grid
Accepts any non-negative, value.
Defaults to 0px.
Available since version 1.5.0.
typeoptional
Type of authors to list.
Accepts “authors”, “users” or “guests”.
Defaults to authors.
Available since version 1.0.0.
orderoptional
Designates the ascending or descending order of the “orderby” parameter.
Accepts “asc” or “desc”.
Defaults to asc.
Available since version 1.0.0.
orderbyoptional
Sort retrieved authors by parameter.
Accepts “name”, “first_name”, “last_name”, “mail”, “job”, “company”, “include”, “post_count” or “rand”.
Defaults to name.
Available since version 1.0.0.
include_usersoptional
Comma separated list of registered authors to include into the list.
Available since version 1.0.0.
exclude_usersoptional
Comma separated list of registered author IDs to exclude from being listed. If this is used in the same query as ‘include_users’, it will be ignored.
Available since version 1.0.0.
include_guestsoptional
Comma separated list of guest authors to include into the list.
Available since version 1.0.0.
exclude_guestsoptional
Comma separated list of guest author IDs to exclude from being listed. If this is used in the same query as ‘include_guests’, it will be ignored.
Available since version 1.0.0.
exclude_archivedoptional
Whether to hide archived authors.
Accepts “yes” or “no”.
Defaults to no.
Available since version 1.4.1..
user_roleoptional
Comma separated list of user role a user must have in order to be listed
Available since version 1.1.10.
min_post_countoptional
Minimum number of posts an author must have in order to be listed.
Accepts integer.
Available since version 1.5.2.
post_typeoptional
Post type to check whether author has any authored entry.
Accepts Comma separated list of post types.
Defaults to post.
Available since version 1.0.2.
show_post_countoptional
Post types to display a post count for. Providing a non-empty value will display the count for the given post types
Accepts Comma separated list of post types to display count for.
Available since version 1.1.19.
countoptional
Maximum number of authors to list.
Accepts integer.
Defaults to all.
Available since version 1.0.0.
paginateoptional
Authors to list per page. If number of authors to list is bigger, the list gets paginated. There can only be one pagination per page, so adding this shortcode with pagination in a page that is already paginated or that already has another shortcode like this one, will cause conflict.
Accepts integer.
Defaults to false.
Available since version 1.0.1.
Important

To avoid slow page loading speeds, the list gets paginated when the number of authors to list is bigger than 30. You can disable pagination adding paginate=0

name_formatoptional
How to display author name.
Accepts “display_name”, “first_name_first” or “last_name_first”.
Defaults to display_name.
Available since version 1.0.1.
show_biooptional
Whether to display author bio. Applies only to ‘basic’ and ‘box’ layouts
Accepts ‘true’ or ‘false’.
Defaults to false.
Available since version 1.1.10.
bio_formatoptional
Whether to display the full or short bio
Accepts full or short.
Defaults to full.
Available since version 1.1.12.
list_iconrenamedoptional
The icon to display before the author name on the flat layout template.
Accepts “feather”, “doc”, “list”, “user”, “info”, “at”, “checkmark”, “ok”, “cancel”, “plus”, “minus”, “star”, “heart”, “notice”, “tip” or “none”.
Defaults to feather.
Available since version 1.0.0.
Replaced by yes.
list_idoptional
Custom HTML ID to add to the list wrapper
Accepts text.
Available since version 1.1.9.
list_classoptional
Custom CSS class(es) to add to the list wrapper
Accepts text.
Available since version 1.1.9.
list_attsoptional
Custom HTML attributes to add to the list wrapper
Accepts text.
Available since version 1.1.9.
default_option_labeloptional
Text to display for the select default option
Accepts text.
Available since version 1.4.1.
default_option_valueoptional
Value for the select default option
Accepts text.
Available since version 1.4.1.

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:

with_postsoptional
Whether to list only those authors with at least one authored post.
Accepted “yes” or “no”.
Defaulted to no.
Was available from version 1.0.0 to 1.5.1.
styleoptional
Layout used to display the list.
Accepted “flat”, “basic” or “complete”.
Defaulted 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.
Accepted “feather” or “doc”.
Defaulted to feather.
Was available from version 1.3.5 to 2.3.5.
Replaced by list_icon.
force_displayoptional
When “box” output selected, forces to display author boxes regardless of the configured Display Settings.
Accepted “yes” or “no”.
Defaulted to no.
Was available from version 3.2.6 to 3.2.19.
select_attsoptional
Custom attributes to add to the select tag.
Accepted text.
Was available from version 1.0.0 to 1.1.8.
select_classoptional
CSS class(es) for the select.
Accepted text.
Was available from version 1.0.0 to 1.1.8.
select_idoptional
Id for the select.
Accepted text.
Was available from version 1.0.0 to 1.1.8.
Updated on January 15, 2024

Did not find a solution? We are here to help you succeed.
Open a support ticket