Title: Change which sidebar product cat is highlighted
Last modified: January 19, 2026

---

# Change which sidebar product cat is highlighted

 *  Resolved [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/)
 * My products are assigned to two categories as in Root -> Child
 * I want the sidebar product menu to always highlight the Child category. Is there
   an action I can intercept, and override, to modify what gets selected as active
   and highlighted? I’ve been able to find one for the main menu, nav_menu_css_class,
   but can’t seem to locate what does the sidebar product categories menu.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/#post-18791212)
 * Hi there!
   Thanks for explaining your goal! Before we go further, could you clarify
   which block or widget you’re using to display the sidebar product menu? Could
   you also please share the shop page URL where you want to highlight the active
   child category?
 * In the meantime, you can use the **Category List block**, then select **Taxonomy
   → Product Categories** from the right sidebar, as shown in these screenshots:
    - [https://go.screenpal.com/watch/cOVqFDnrPsN](https://go.screenpal.com/watch/cOVqFDnrPsN)
    - [https://go.screenpal.com/watch/cOVqFFnrPMi](https://go.screenpal.com/watch/cOVqFFnrPMi)
 * **Note:** Do not use the older Product Categories widget. Instead, use the Category
   List block and set the taxonomy to Product Categories as shown above.
 * When you use the Category List block, WooCommerce automatically adds the class**`
   current-cat`** to the active category. You can target this class with CSS to 
   change the color or otherwise highlight the active child category.
 * I hope this helps.
 *  Thread Starter [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/#post-18791532)
 * Thank you for the reply.
 * So I’m using the Flatsome theme and the “Shop Sidebar” uses Product Categories
   widget.
 * I didn’t explain the category structure correctly. Technically I’m not using 
   Parent -> Child configuration. I have 2 global categories, each product is always
   assigned to one of those. If we use car analogy, think of it as “All Toyota” 
   and “All Ford”. Then, I have more descriptive categories, eg. Body, Suspension,
   Electrical. If a product is added to “All Toyota” and Electrical, I want the 
   the Electrical menu to be the active one, not “All Toyota”.
 * I was able to get this to work for the breadcrumbs using a hook but I can’t figure
   out how to intercept the data which generates the sidebar widget menu.
 * (Creating a true Parent -> Child category setup is not an option, there aren’t
   enough products)
 *  Plugin Support [Frank Remmy (woo-hc)](https://wordpress.org/support/users/frankremmy/)
 * (@frankremmy)
 * [2 months, 2 weeks ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/#post-18791577)
 * Hi [@jetcrusher](https://wordpress.org/support/users/jetcrusher/),
 * Thanks for the clarification! I understand you want to prioritize the more descriptive
   categories (like “Electrical”) over the brand categories (“All Toyota”, “All 
   Ford”) in your sidebar widget highlighting.
 * Since you’re working with the Flatsome theme’s Product Categories widget and 
   need to intercept the data that determines which category gets highlighted, this
   involves custom code modifications that are outside our[ Support Policy](https://woocommerce.com/support-policy/).
 * That said, I would suggest:
    - Overriding the default Product Categories widget output via custom code (e.
      g., by extending `WP_Widget_Categories` or hooking into the widget output).
      In your custom logic, dynamically detect the current product’s assigned categories,
      prioritize your descriptive categories (“Body,” “Suspension,” “Electrical”),
      and then add the `current-cat class` to those in the sidebar markup instead
      of the global ones.
    - Consider switching to the Category List block in a sidebar widget area (if
      your theme supports block-based sidebars or widget areas). The block gives
      more flexibility and can be targeted via hooks or filters to customize active
      categories.
 * If you’re open to custom development, I would recommend our [WooExperts](https://partners.woocommerce.com/English/marketplace/)
   and [Codeable.io](https://woocommerce.com/codeable/) as options for getting professional
   help. Alternatively, you can also ask your development questions in the [WooCommerce Community Slack](https://woocommerce.com/community-slack/).
 * I hope that helps. Let us know if you need anything else.
 *  Plugin Support [thelmachido a11n](https://wordpress.org/support/users/thelmachido/)
 * (@thelmachido)
 * [2 months ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/#post-18805632)
 * It’s been a while since we heard back from you for this reason we are closing
   this thread. 
 * If WooCommerce has been useful for your store and you appreciate the support 
   you’ve received, we’d truly appreciate it if you could leave us a quick review
   here: 
 *  [https://wordpress.org/support/plugin/woocommerce/reviews/#new-post](https://wordpress.org/support/plugin/woocommerce/reviews/#new-post)
 * Feel free to open a new forum topic if you run into any other problem. 

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchange-which-sidebar-product-cat-is-highlighted%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [thelmachido a11n](https://wordpress.org/support/users/thelmachido/)
 * Last activity: [2 months ago](https://wordpress.org/support/topic/change-which-sidebar-product-cat-is-highlighted/#post-18805632)
 * Status: resolved