New and Improved Shortcodes in PublishPress Authors
We're starting a major set of improvements to the PublishPress Authors plugin. The goal of these upgrades is to add some key new features:
- More customizable author pages.
- The ability to display all of your authors on one screen.
- Better support for the WordPress REST API.
- More design and layout options for profiles.
- Categories for Authors, so you can group them into “Writers”, “Photographers”, “Researchers” and other groups.
The first step is to improve the shortcodes in PublishPress Authors. These changes will form the foundation of several more of these upgrades.
In this post, I'll explain recent changes to the shortcodes in PublishPress Authors. If you want to dig deeper, follow these links:
Shortcodes are easier to find
All of the shortcodes in PublishPress Authors are now available in the “Settings” area of the plugin. Previously, you had to visit the documentation on this website to find the shortcodes.
All Shortcodes have specific names
In previous versions of PublishPress Authors, the shortcodes had general names such as these:
We found that people were running into conflicts with some other plugins that used the same shortcode names. So the PublishPress Authors shortcodes now all have unique names. Your sites will still work if you're using the old names, but we do recommend updating to the new versions.
There's a new Authors Data shortcode
The new “Authors Data” shortcode is a more flexible alternative to the basic Author Box shortcode. With this shortcode you can specify data from the authors attached to the post being viewed.
Here are some examples of data elements that you can show:
Let's see some examples. This shortcode will show only the first name of each author attached to the post:
This shortcode will show only the first name of each author, but separated with an asterisk:
[publishpress_authors_data field="last_name" seperator="*"]
This shortcode will show only the WordPress nicename of each author, only from the post with an ID of 32.
[publishpress_authors_data field="user_nicename" post_id="32"]