Note: If you setup a timeline with a custom post type limited by category or term, and all of the posts are displaying – you may want to double check that the shortcode is setup properly. If no posts are found using your parameters, all posts will be returned.

Along with limiting the timeline to a specific set of post types you can also specify the category, tag or custom taxonomy that you would like the timeline to be limited to for the given post type.

For example, you could limit a timeline to the ‘Posts’ on your site which are categorized under “Wedding” or “Personal Achievements”.

Along with the standard, built-in, WordPress tags and categories you may also choose to use a custom taxonomy for your given post type. With the ability to specify a custom taxonomy/term for the chosen post types the add-on becomes extremely flexible and allows you to create highly custom Timelines.

Limit by Categories

To limit your timeline to posts by a specific category you’ll want to add a category parameter to the shortcode with either the name or the ID of the category.

Example:

[ timeline-express post-type="post" category="Wedding" ]

It’s also worth nothing that you can specify more than one category to display in the timeline. If you want to display the “Wedding” posts and the “Personal Achievements” posts on the same timeline, you would just add “Personal Achievements” name after “Wedding” in the shortcode, separated by a comma (,).

Example:

[ timeline-express post-type="post" category="Wedding, Personal Achievements" ]

Limit by Tags

You can also limit your timeline to a set of tags that you have assigned to your posts. If you want to use tags, instead of categories, you’ll want to use the tag shortcode parameter with a comma separated list of tag names or tag IDs. The example below would render a timeline

Example:

[ timeline-express post-type="post" tag="Tutorial" ]

Similar to displaying a timeline with multiple categories you can display multiple tags on a timeline using a comma separated list of tag names or tag IDs.

Example:

[ timeline-express post-type="post" tags="Tutorials, Cooking" ]

Limit by Custom Taxonomies

Some websites are a bit more customized than others and have a number custom post types on them with tags, categories and custom taxonomies that are not included with WordPress out of the box. Some plugins, when activated, will also enable new post types on your site.

Timelines can also be limited to those post types and custom taxonomies or terms!

Let’s assume in this example that a user has a post type called ‘History’ with a taxonomy ‘Milestone’ that behaves similarly to tags. They want to display a timeline of history posts that have been tagged ‘Achievement’, ‘Expanded’ or ‘Growth’.

Example:

[ timeline-express post-type="history" custom_term="milestone" custom_terms="Achievement, Expanded, Growth" ]

Taking it a step further, and expanding on the section below, this user can limit the timeline to include history posts that have been tagged with ‘Achievement’, ‘Expanded’ AND ‘Growth’. This means if someone has only tagged a post ‘Achievement’ it won’t show up on the timeline. It will only render on the timeline when all three tags have been added.

Example:

[ timeline-express post-type="history" custom_term="milestone" custom_terms="Achievement, Expanded, Growth" relation="AND" ]

Tag/Category/Taxonomy Relation

Essentially, this add-on will alter the query run for each timeline. There are a number of arguments that can be added to the WP_Query class when it’s run to alter what is returned.

During the query to retrieve posts tagged or categorized a certain way, the ‘relation’ is set to ‘OR’. Using the example above, the query would return posts tagged Tutorials OR Cooking.

While this suits most use cases, there may be a time when you only want posts that are tagged Tutorials AND Cooking.

The relation shortcode parameter can be used here to specify AND.

Example:

[ timeline-express post-type="post" tags="Tutorials, Cooking" relation="AND" ]