How Can We Help?

You are here:
  • KB Home
  • Basic Usage
  • Using the shortcode
Print

After setting the plugin up and adding some team members we can start showing them to the public. One way to display the a-staff Loop is to use the good old [a-staff] shortcode, another way is to add the loop as a Gutenberg block (if you are using the Gutenberg editor).

In this article we’ll cover how to use the shortcode version.

How to use the a-staff shortcode?

First navigate to the page in wp-admin where you want to add the Team Member boxes. It will most probably be your “Meet our Team” page or a part of your about page – it’s up to you, because you can place the shortcode wherever you’d like to.

When you are inside the page editor, all you have to do is to place the [a-staff] shortcode where you’d like to display the members.

Place the shortcode wherever you’d like to in the content.

And after saving the page, you’ll have to see something like this in the front end (provided you’ve already added some team members):

Output of the shortcode

Shortcode parameters

You can add some parameters to modify its behavior:

  • [a-staff ids="869,1074"] – if the IDs attribute is added, only the members with the specific IDs will be displayed. It can be a good practice to use it if you’d like to show only a few members of the team.
  • [a-staff exclude="869,1074"] – does the opposite, will leave out the members with the specified IDs from the list.
  • [a-staff class="my-class"] – adds a user-defined class to the container element (.a-staff-members). This way you can add special styling to different instances of the shortcode.
  • [a-staff columns="4"] – will show the team members in 4 columns instead of your default setting in a-staff » Settings. The columns value can have values from 1 to 6.
  • [a-staff orderby="date"] – sets the criteria based on what should the boxes be ordered inside the a-staff Loop. Currently can have the following values:
    • menu_order (default): The order number set manually for each team member on the member editor screen
    • title: the Name of the team member (not the Member Title!)
    • date: the date when the member was added to your WordPress site.
  • [a-staff order="ASC"] – should the orderby values follow each other in ascending (ASC) or descending (DESC) order? Can have these 2 values: ASC or DESC.
  • [a-staff department="finances"] – will show the members only from the Finances Department. (Pro version only)
    • You can add departments here using their category slugs.
    • If you want to add more departments, separate them with commas.
  • [a-staff exclude-department="finances,marketing"] – will show all members except of those that are in the Finances and the Marketing departments (Pro version only)

We have set up a page with some working examples here.

Previous Adding and editing Team Members
Next Using the Gutenberg blocks
Table of Contents