I have a WordPress site, with WooCommerce. The WooCommerce archives pages as shop display a dropdown sorting filter like in this screenshot:
![enter image description here](https://i.stack.imgur.com/Z44XN.png)
Now in another page let’s say example.com/foo
On that page I use a WooCommerce shortcode:
[product_category per_page="90" columns="3" orderby="" order="ASC" category="foo" prdctfltr="yes" pagination="yes"]
But the sorting dropdown is not shown.
What I am doing wrong? How can I display the sorting dropdown?
Since WooCommerce 3.2, Woocommerce shortcodes and their available attributes have changed.
So try the following shortcode instead (for “foo” product category):
[product_category limit="90" columns="3" category="foo" paginate="true"]
or inside php code:
echo do_shortcode( '[product_category limit="90" columns="3" category="foo" paginate="true"]' );
Now you will see that the sorting options dropdown appear.
Note: orderby
argument with an empty value has no effect. order
argument is ASC
by default.