WooCommerce has a Product Category dropdown list of available product categories which filter and refresh the page based on product selection. It is assigned via a Widget and easy enough to put in the sidebar.

But what about adding it to the top of the main shop and archive pages.?



Here is  a way to display it in the main shop area just below the headline, in essence you create a new widget and position it below the WooCommerce page title.

So in the above code which goes into functions.php a new widget is created named ‘Product Cat Sort’ and positioned outside before the WooCommerce loop and after the headline – it will appear whenever there is a WooCommerce product loop so all the archive pages are covered. All you need to do is add the dropdown to it in the widget area.

If your product pages have a sidebar then you can also use a sidebar widget in your theme to position the dropdown there – that way you have both archive and single pages covered.


  1. David Hyland on November 19, 2019 at 2:55 pm

    Works nicely.

    I have three formatting issues as follows:
    1. Want to have a primary item
    2. Need to restrict width
    3. Need to move to the right hand. The Title is central.

    Suggestions appreciated.

  2. seema on November 13, 2019 at 11:36 am

    hello i have use this widget but i have one problem, in the drop down the categories not showing ? showing in the drop down is uncategory

  3. Yati on August 22, 2018 at 9:58 am

    Thank you!

  4. varan on January 25, 2018 at 12:06 pm

    It works great, thank you very much. Is it also possible to add this to the product page it self. So if someone clicks on the product and also can go trough the categorie.

Leave a Comment