This documentation describes unreleased changes on the main branch.

wp_term_name()

Twig function of the framework; its result is escaped like any value.

{{ wp_term_name(id) }}

The name of a term (category, tag or term of another taxonomy), as text. Returns '' if the ID is null or the term does not exist.

<span class="category">{{ wp_term_name(attrs.category) }}</span>
ParameterTypeDefaultDescription
idint|nullrequiredID of the term.

Returns string