Authors List Shortcode

One of the shortcodes available in PublishPress Authors is the Authors List shortcode.

This shortcode allow you to show a list of all the authors who are attached to posts on your site. This shortcode will not show authors if they are not linked to any posts.


How to Use the Authors List Shortcode #

This is the simplest version of the shortcode:

[publishpress_authors_list]

Here is how this shortcode appears when added to the Gutenberg editor in a block:

Authors List Shortcode
Authors List Shortcode

You can find examples of the Authors list shortcodes by going to “Authors”, then “Settings”, then “Shortcodes” in your WordPress site.

Authors List Shortcodes
Authors List Shortcodes

How to Customize the Authors List Shortcode #

The Authors List shortcode can also be customized with many options. Let's start by looking at layouts. For example, this will show all your authors in a boxed layout:

[publishpress_authors_list layout="boxed"]

There's a wide variety of ways you can sort and filter the authors display. Let's see some examples.

You can control the number of authors per page using limit_per_page="12". So this shortcode would use the Boxed layout and show 5 authors per page:

[publishpress_authors_list layout="boxed" limit_per_page="5"]

By default, author will be hidden if they don't have any posts. You can show all authors even if they don't have any assigned posts using show_empty="1". This shortcode will use the Simple List layout and only show authors who have written posts:

[publishpress_authors_list layout="simple_list" show_empty="1"]

You can order the display by the number of posts or the name of each author. This will display the authors in the inline layout and the authors will the most posts will be listed first:

[publishpress_authors_list layout="inline" orderby="count" order="desc"]

You can remove authors from the display if they have not posted in a certain time frame. This accepts values such as “1 week ago“, “1 month ago“, “6 months ago“, and “1 year ago“.

[publishpress_authors_list layout="inline" last_article_date="1 year ago"]

If your layout is grouping authors together, you can customize which field is used. For example, the “Authors Index” layout uses the “First Name” field by default. This shortcode below will sort by the “Last Name” field:

[publishpress_authors_list layout="authors_index" group_by="last_name"]

If your layout has columns, the shortcode allows you customize the number of columns:

[publishpress_authors_list layout="boxed" layout_columns="2"]