New and Improved Shortcodes in PublishPress Authors

New Shortcodes 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.

Shortcode Tabs
Shortcode Tabs

All Shortcodes have specific names

In previous versions of PublishPress Authors, the shortcodes had general names such as these:

[author_box]
[authors_list]

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.

[publishpress_author_box]
[publishpress_authors_list]

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.

[publishpress_authors_data]
Shortcodes Data

Here are some examples of data elements that you can show:

  • display_name
  • first_name
  • last_name
  • ID
  • user_nicename
  • user_email

Let's see some examples. This shortcode will show only the first name of each author attached to the post:

[publishpress_authors_data field="first_name"]

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"]

Leave a Reply

Your email address will not be published. Required fields are marked *

Professional publishing plugins for WordPress! Get PublishPress

  • SUBSCRIBE TO OUR NEWSLETTER
  • SEARCH THIS SITE