The shortcode lists items that carry a tag, as a plain list of linked titles with a date. Unlike the listposts shortcode, it works with any content type, including tasks, projects, training courses, teams and vacancies, and it lets you set how many to show. Use it to put “Latest guidance about X” or “Training on X” on a page and let the tag do the work.
Add the shorttags shortcode
Type the shortcode where the list should appear, in the Classic Editor:
Or select the Insert shortcode button on the editor toolbar, choose Short tag list, fill in the boxes and select Insert.
Attributes of shorttags
tag
Required. The slug of the tag: lower case, hyphens instead of spaces, as shown in the Slug column of the Tags screen under any tagged content type, such as Tasks, then Tags. One tag only. If nothing carries the tag, the shortcode shows nothing.
type
Optional. The slug of one content type: news, news-update, blog, event, task, project, training, team or vacancy, if that module is switched on. Leave it out to list tagged items of every type together. Pages cannot be tagged, so type="page" lists nothing.
num
Optional. How many items to show. The default is 5.
What shorttags shows
A bulleted list of published items, each a linked title followed by its publication date. The order depends on the type:
- task and training: alphabetically by title, so a list of guidance reads like an index.
- event: upcoming events only, by start date, soonest first. Past events are left out.
- Everything else, and no type: newest first.
If the site uses The Events Calendar plugin, type="tribe_events" orders those events by their start date too.
Examples of shorttags
The five tasks tagged “expenses”, A to Z:
The three most recent news stories tagged “hr”:
Training courses tagged “leadership”, A to Z, up to ten:
The latest eight items of any type tagged “wellbeing”:
Related
- Display a grid of tagged content: cards with images for everything carrying a tag, with no limit.
- Display a list of posts: news, news updates, blog posts and upcoming events by category.
- Learn how tags work.
