• First time using wp_term_query, and I noticed the terms don’t get reordered by the plugin when using it.

    Pulling the same terms but with get_terms, they are ordered correctly, so I can just keep using that… but i figured i’d post anyway since it seems like an oversight.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Thank you for the report. I will look into this.

    Plugin Author Marcel Pol

    (@mpol)

    Thanks, this is interesting :).

    Currently in trunk is a filter to set the default order_by correctly. If you set it in the plugin to term_order, that will be the default in the query.

    However, the class/method doesn’t have a filter like get_terms to hook into, so there is no way to apply custom ordering.

    There are 2 ways to go.

    You can apply a filter for get_terms in your own code. That should be feasible after you get an array of terms.

    Another way forward is to have a filter in the class/method in WP Core. I added a Trac ticket just a minute ago. I will see what happens on it.
    https://core.trac.www.ads-software.com/ticket/40661

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Doesn’t reorder when using wp_term_query’ is closed to new replies.