If you want to create a Staff page with the names, bios, and thumbnail images of some or all of your editorial staff, you can use the Staff Roster Shortcode to build the page. The shortcode pulls all information for each staff member from their User profile page.
In its simplest form, a staff roster shortcode looks like:
The shortcode has several optional attributes to filter which users appear in the roster.
By default, the roster shortcode includes only users with the “author” role. If you want to include other WordPress roles like administrator and editor, use comma-separated values like so:
All possible values for the roles attribute:
Use this attribute to exclude users by ID. For example, say you have a user called “Largo Project Administrator” which has an “administrator” role and a user ID of 5. Here’s how you would exclude that user from the staff roster:
To find the user ID for a given user, visit the user’s profile page in Users, and check the URL for the number after:
To exclude more than one user, use comma-separated values. For example:
Similarly, you can specifically include users with the include attribute. If you wanted to exclude all “administrator” users except “Largo Project Administrator” your roster shortcode would look like:
By default, the roster shortcode does not display users who have an empty bio/description. If you want to show users with an empty bio/description anyway, add the attribute show_users_with_empty_desc to the roster shortcode like so: