Product Categories (Shop Sidebar) – How to Sort?

Solved4 replies3 participantsUpdated by Tony Rodriguez

  • Avatar: HUSSTLE
    HUSSTLE
    Participant

    Is there a way to have the categories automatically sort based on alphabetical order? I added 4 new categories, but they are not sorting even after refresh. Anything I am missing here?

    Files is visible for topic creator and
    support staff only.

    4 Answers

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @HUSSTLE,

    Please try using the following PHP snippet in your child theme’s functions.php file:

    add_filter('etheme_widget_product_categories_query', function($args) {
        $args['orderby']  = 'name';
        $args['order']    = 'ASC';
        return $args;
    }, 10, 1);

    If you still require our assistance, please provide temporary wp-admin access in the private content section.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: HUSSTLE
    HUSSTLE
    Participant

    Worked BEAUTIFULLY!

    Thanks!

    Avatar: HUSSTLE
    HUSSTLE
    Participant

    Thanks for the support! My topic “Product Categories (Shop Sidebar) – How to Sort?” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear HUSSTLE,

    It’s great having you in our WordPress & WooCommerce community!

    Every insight you share helps us refine XStore and build tools that empower thousands of online store owners worldwide.

    Together, we grow stronger with every release.

    Topic closed.
    The 8Theme Team

The issue related to '‘Product Categories (Shop Sidebar) – How to Sort?’' has been successfully resolved, and the topic is now closed for further responses