Display WooCommerce tag cloud widget as list

WordPress tag widgets display tags in a tag cloud by default. Here’s how to override that default behavior; specifically, how to display WooCommerce tags as lists.

To convert the WooCommerce Product Tags Widget display from tag cloud to list, use something like this. The key here is the taxonomy argument, whose value must correspond to the slug for the WooCommerce product tag (‘product_tag’, by default).

add_filter('woocommerce_product_tag_cloud_widget_args', 'nwb_woo_tag_cloud_filter'); function nwb_woo_tag_cloud_filter($args) { $args = array( 'smallest' => 14,  'largest' => 14,  'format' => 'list',  'taxonomy' => 'product_tag',  'unit' => 'px',  ); return $args; }