Term
Access taxonomy term data. Available on term archive pages and inside term Loop blocks (via the loop data alias).
All Fields
| Field | Arguments | Returns | Description |
|---|---|---|---|
id | — | int | Term ID |
name | — | string | Term name |
title | — | string | Term title (alias for name) |
slug | — | string | Term slug |
description | — | string | Term description |
count | — | int | Post count |
link | — | string | Term archive URL |
path | — | string | Term archive path |
edit_link | — | string | Admin edit URL |
taxonomy | — | object | Taxonomy object |
parent | — | Term | Parent term |
children | — | array | Child terms |
posts | — | array | Posts in this term |
can_edit | — | bool | Current user can edit |
meta | field_name | mixed | Term meta value |
raw_meta | field_name | mixed | Unescaped meta value |
has_field | field_name | bool | Check if field exists |
Basic Fields
{{ term.id }}
{{ term.name }}
{{ term.slug }}
{{ term.description }}
{{ term.count }}
URLs
{{ term.link }}
{{ term.path }}
{{ term.edit_link }}
Taxonomy
{{ term.taxonomy.label }}
{{ term.taxonomy.name }}
Hierarchy
{{ term.parent.name }}
{{ term.parent.link }}
{{ term.children }}
Posts
{{ term.posts }}
Permissions
{{ term.can_edit }}
Custom Fields (Meta)
{{ term.meta('icon') }}
{{ term.meta('color') }}
{{ term.meta('featured_image') }}
Common Patterns
Display term with post count
{{ term.name }} ({{ term.count }})
Build breadcrumb with parent
{{ term.parent.name ?? '' }}{{ term.parent ? ' / ' : '' }}{{ term.name }}
Link to term archive
<a href="{{ term.link }}">{{ term.name }}</a>