Author Box Shortcode

The PublishPress Authors plugin allows you to show author profiles using a shortcode.

With the Author Box shortcode you can display the profile of all the authors attached to a specific post.


How to Use the Author Box Shortcode #

This is the simplest version of the shortcode:

[publishpress_authors_box]

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

Author Box Shortcode
Author Box Shortcode

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

Shortcode Tabs

How to Customize the Author Box Shortcode #

These author box shortcodes can be customized. Here's an example of the shortcode using a specific Author Box layout:

[publishpress_authors_box layout="ppma_boxes_50"]

You can also use a custom theme template that you could generate from this guide. For example, if your custom template name is “my-custom-author-box”, then the shortcode should be:

[publishpress_authors_box layout="my-custom-author-box"]

You can also decide whether or not to show the main title, using show_title=”true” or show_title=”false”. Here’s an example of that more detailed shortcode:

[publishpress_authors_box layout="ppma_boxes_50" show_title="true"]

You can load the authors for a specific post, even if you are not in that post currently. For example, this shortcode will load the authors from the post with the ID of 32:

[publishpress_authors_box layout="ppma_boxes_50" post_id="32"]

You could show author box based on specific term id. Where can you get the term id of an author? You could get it from Authors menu, and edit the author:

[publishpress_authors_box layout="ppma_boxes_50" term_id="103"]

If you want to use user id instead of term id, you could do that as well using user_id parameter. You could get the user id from Users menu.

[publishpress_authors_box layout="ppma_boxes_50" user_id="2"]

You can load the authors belonging to a specific author categories by providing the category slug or slugs separated by comma for more than one category.

[publishpress_authors_box author_categories="reviewer,coauthor"]

There is one final option to mention. This is mostly useful if you're using a theme or page builder to customize the Author profile pages you find at URLs such as /author/username/. You can use the following shortcode on the authors page to display the profile of the current author. You just need to add the parameter archive="true":

[publishpress_authors_box layout="ppma_boxes_50" archive="true"]

If you are having problems showing PublishPress Authors on author profile pages, you can use this shortcode below. The argument archive=”1″ forces the plugin to retrieve the Author from the profile page and not any other posts on the same screen.

[publishpress_authors_box layout="ppma_boxes_50" archive="1"]