apply_filters( 'get_terms_args', array $args, string[] $taxonomies )

Filters the terms query arguments.

Parameters Parameters


(array) An array of get_terms() arguments.


(string[]) An array of taxonomy names.

Top ↑

Source Source

File: wp-includes/class-wp-term-query.php

View on Trac

Top ↑

Changelog Changelog

Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Jose Lazo

    To reorder categories list in functions.php

     * Order categories
    function wp_custom_sort_get_terms_args( $args, $taxonomies ) 
        $args['orderby'] = 'description';
        $args['order']   = 'ASC';
        return $args;
    add_filter( 'get_terms_args', 'wp_custom_sort_get_terms_args', 10, 2 );

Top ↑

You must log in before being able to contribute a note or feedback.