Custom Taxonomy Order logo

If you want to use the Custom Taxonomy Order plugin to order the taxonomy terms for one or more taxonomies, first make sure the incompatibilities mentioned below do not apply to your situation. If they do, switch to Advanced Taxonomy Terms Order (paid) or Intuitive Custom Post Order (free). Both do not have these issues.

If you want to use this plugin to order the taxonomy terms for one or more taxonomies, make sure to go through the setup instructions below to preserve that order for facets that use these taxonomies as their data source, and have “Term order” set in their “Sort by” setting.

Incompatibilities

This plugin does not correctly order facet choices in these specific scenarios:

In these scenarios, we recommend switching to Advanced Taxonomy Terms Order (paid) or Intuitive Custom Post Order (free) instead to get correct ordering of the facet choices.

Setup

  1. First, create (or edit) a facet and set its data source to a taxonomy. You’re going to order the terms of this taxonomy with Custom Taxonomy Order.
  2. The 'Sort by > Term order' facet setting.
    The “Sort by > Term order” facet setting.

    Set the facet’s “Sort by” option to “Term order”. Only the following facet types have this setting: Checkboxes, Dropdown, Radio, fSelect, Hierarchy, Hierarchy Select, and Color.

  3. Add one of the two snippets below to your (child) theme’s functions.php. Which one depends on if you are using WooCommerce, and if so, how you want to order product categories.

    If you are using WooCommerce, you need to decide if you want to order the product categories taxonomy with this plugin or not, because WooCommerce already has its own drag-and-drop ordering interface for product categories.

    If you are not using WooCommerce, or if you are using WooCommerce and you want to use the Custom Taxonomy Order plugin’s ordering interface for product categories, add the following code snippet to your (child) theme’s functions.php to fix facet ordering when using “Term order”:

    How to use custom PHP code?

    PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

    // Use if not using WooCommerce, // or if so, to also order product categories with Custom Taxonomy Order add_filter( 'get_terms_args', function( $args, $taxonomies ) { if ( isset( $args['term_order'] ) ) { $args['orderby'] = 'term_order'; } return $args; }, 10, 2 ); add_filter( 'get_terms_orderby', function( $orderby, $query_vars, $taxonomies ) { return 'term_order' === $query_vars['orderby'] ? 't.term_order' : $orderby; }, 10, 3 );

    If you are using WooCommerce, and you want to use the WooCommerce drag-and-drop interface to order product categories, add the following snippet instead. It fixes taxonomy ordering for all taxonomies like the above snippet, but preserves WooCommerce ordering (which happens by a term meta field named “order”):

    How to use custom PHP code?

    PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

    // Use to order product categories with WooCommerce drag-and-drop instead of Custom Taxonomy Order add_filter( 'get_terms_args', function( $args, $taxonomies ) { if ( isset( $args['term_order'] ) && 'order' !== $args['meta_key'] ) { $args['orderby'] = 'term_order'; } return $args; }, 10, 2 ); add_filter( 'get_terms_orderby', function( $orderby, $query_vars, $taxonomies ) { return 'term_order' === $query_vars['orderby'] ? 't.term_order' : $orderby; }, 10, 3 );
  4. Next, in Tools > Term order, select the taxonomies that you want to order with this plugin and order the terms with the ordering interface.
  5. Last but not least: do a full re-index.

See also

Last updated: December 3, 2025