wp_term_url()

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

{{ wp_term_url(id) }}

The URL of the archive of a term (category, tag or term of another taxonomy), as returned by get_term_link(). Returns '' if the ID is null or the term does not exist.

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

Returns string