Support » Plugin: WooCommerce » Category widget list categories specific to products on page

  • I’m trying to find a way to only show categories in the sidebar widget that are related to the products shown on a category page instead of displaying them all. For instance, I have a product that has a parent category of “Ford Powerstroke” and is also in a subcategory “1999-1997 Powerstroke” as well as other categories like “Programmer Chips Modules” and “Supper Chips”.

    When I go to the “Ford Powerstroke” category page, I want to only show the subcategories and other categories associated with the products shown. I don’t want to display all categories.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Caleb Burks


    Automattic Happiness Engineer

    Have you tried using these settings: This will get you most of the where there to what you are looking to do.

    No, that just hides categories if they are empty. All categories will have products in them, so that option will not work.

    When I go to a category page, I want the category list in the sidebar to only show the categories that are associated with the products on that category page.

    I should note that I am a developer and looking for a coding option to do this.

    Plugin Author Mike Jolley


    We don’t offer this option. You will need to code a custom widget, but the query to see what cats are within all shown products could get heavy. Look at layered nav for SQL inspiration.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category widget list categories specific to products on page’ is closed to new replies.