Woocommerce List Products in Same Category as Current Product.

“woocommerce query get current category id”


The need to create a widget which can show a list of woocommerce products in same category as current product.


  1. add this code to the widgets.php
  2. register your widget
  3. drag your widget in sidebar back-end
  4. add a css active item color
  5. done.

woocommerce list products



Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *