Show Categories#
Use a paired taxonomy tag to loop the terms on the current post:
{{ categories }} <a href="{{ url }}">{{ title }}</a>{{ /categories }}Inside the loop, {{ title }} is the term name and {{ url }} is the term archive URL.
Show Tags#
Tags use the same shape:
{{ tags }} <a href="{{ url }}">{{ title }}</a>{{ /tags }}categories maps to the WordPress category taxonomy.
tags maps to the WordPress post_tag taxonomy.
Use Custom Taxonomies#
For custom taxonomies, use the taxonomy name:
{{ project_types }} <a href="{{ url }}">{{ title }}</a> <span>{{ slug }}</span>{{ /project_types }}Common term values are {{ title }}, {{ name }}, {{ slug }}, {{ url }}, and {{ count }}.
Inside A Query#
Taxonomy loops use the current post, so they also work inside query loops:
{{ query:posts limit="3" }} <article> <h2><a href="{{ url }}">{{ title }}</a></h2> {{ categories }} <a href="{{ url }}">{{ title }}</a> {{ /categories }} </article>{{ /query:posts }}Inside query:posts, the categories belong to each post in the query.
Filter By Taxonomy#
Use taxonomy:{taxonomy} to query posts by term slug:
{{ query:posts taxonomy:category="news" limit="6" }} <h2><a href="{{ url }}">{{ title }}</a></h2>{{ /query:posts }}Use pipes when more than one term can match:
{{ query:posts taxonomy:post_tag="bread|recipe" limit="6" }} <h2><a href="{{ url }}">{{ title }}</a></h2>{{ /query:posts }}For the full filtering syntax, see Query Loop Filtering.