Reputation: 779
WooCommerce plugin comes with a widget for product categories. I would like to display this widget outside of the sidebar using a template tag.
I can use this template tag <?php the_widget( 'WC_Widget_Product_Categories' ); ?>
but it displays the categories as an unordered list, I would like to display it as a drop down list.
The widget itself comes with options when you add it in the widget section, I cant figure out how to set these options (specifically the drop down list) in the template tag so it shows up correctly.
I also tried this tag <?php woocommerce_product_dropdown_categories( 1,1,1,1 );?>
which displays the product categories as a drop down list but when you click on the category nothing happens (ie it doesn't take you to the category page you clicked on).
Any ideas how I can achieve this?
Upvotes: 1
Views: 4183