get_terms_orderby WordPress Filter Hook
The get_terms_orderby hook allows you to modify the order in which terms are returned by the get_terms function. The most common use for this hook is to alphabetize terms, but it can also be used to order terms by popularity or by the number of posts in a given term.
apply_filters( 'get_terms_orderby', string $orderby , array $args , string[] $taxonomies ) #
Filters the ORDERBY clause of the terms query.
Parameters
- $orderby
(string)
ORDERBY
clause of the terms query.- $args
(array)An array of term query arguments.
- $taxonomies
(string[])An array of taxonomy names.
Source
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |