Support » Plugin: WooCommerce » WooCommerce Sort by – Change for Specific Categories

  • Resolved drivencoffee

    (@drivencoffee)


    In WooCommerce settings, you can set the default sort order for products. We currently have this set to sort via “popularity”. For two of our product categories, Merch and Equipment, we would like to override the default product sort order to display via “latest”. Is there a PHP function to override the default product sort method, based on the category?

    For our website we would like to keep the default sorting as “popularity”. Then add an override similar to the following…

    If product category is Merch then sort by “latest”.
    If product category is Equipment then sort by “latest”.

    Perhaps there is some existing code to achieve this function? Thank you!

    Our website is: https://www.drivencoffee.com/

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.