• Resolved kevinjbeaty

    (@kevinjbeaty)


    Is there a way to order taxonomies in reverse alphabetical order? I use date-oriented labeling, so the most recent entries are pushed to the bottom, which is making for some long-scrolling. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author webbistro

    (@webbistro)

    Hello @kevinjbeaty,

    Right now sorting taxonomies is not possible. Thank you for your request, we added this to our TODO list. Do you mean taxonomies or their terms actually? You can post an example of your structure here.

    Best,
    -Nadia

    Thread Starter kevinjbeaty

    (@kevinjbeaty)

    Thanks for getting back to me so quickly!

    I mean the terms of a single taxonomy. I see there’s an option for alphabetical ordering or order by entry time/date, but it would be great to have it in reverse!

    You can see a screenshot of my taxonomy here, which I’d like to have reversed.

    Best,
    Kevin

    Plugin Author webbistro

    (@webbistro)

    Hi Kevin,

    A quick solution:

    add_filter( 'get_terms', 'YOUR_PREFIX_get_terms', 10, 4 );
    
    function YOUR_PREFIX_get_terms( $terms, $taxonomies, $args, $term_query ) {
    
        $args['order'] = 'DESC';
        $terms = $term_query->query( $args );
    
        return $terms;
    }

    But (!), this will “reverse” all taxonomy terms order, including post categories. We will add more particular solution to the new major update of the plugin.

    Best,
    -Nadia

    Thread Starter kevinjbeaty

    (@kevinjbeaty)

    wow thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reverse Alphabetical Order?’ is closed to new replies.