This topic has 7 replies, 2 voices, and was last updated 10 years, 1 months ago ago by Eva Kemp
In the Products Section you can drag and drop to visually sort the products. Or by entering menu_order numbers foe each product, they can also be sorted. When displaying a Category page, the products display in the selected sort order. But when using the etheme_products short code from the visual composer, the sort order does NOT work. It seems to use the product date to sort them.
Is there a way to get the shortcode etheme_products for a grid to sort them by menu order?
Here is the shortcode added from visual composer:
[etheme_products type=”grid” style=”default” title=”Thanksgiving Menu” columns=”3″ categories=”76″ limit=”30″]
Hello,
You can add this attribute to the code: orderby="date"
Replace the “date” with the term you need.
Thank you.
Regards,
Eva Kemp.
Thanks Eva, however this does not work for me. I tried:
orderby="menu_order" (the field name)
orderby="order"
orderby="menu"
None of these work. Was this introduced in the latest version of Legenda? If so, what version? I am using version 2.2 of Legenda.
Can you point me to a place in the code where I can see that ‘orderby’ is a valid attribute? I cannot find it.
Further, then is there a way to fix ASC or DEC (Ascending or decending) order?
Sorry, wrote too soon. It still does not work, but I see where orderby
is a standard argument for the WP_Query
class. And it accepts values of:
// Used to filter values
$allowed_keys = array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');
Is there an override that might be happening somewhere and forcing orderby="date"
?
Thanks!
Ah, and I see that I can use:
order="ASC"
order="DESC"
But orderby="menu_order"
still does not work as expected.
the etheme_products
shortcode is not passing the orderby
and order
attributes to the WP_Query
class, at least in my version. These attributes are ignored in the current shortcode.
Hello,
We are sorry, but there is no such attribute. Please refer to our documentation:
https://www.8theme.com/demo/docs/legenda/index.html#!/legenda_shortcodes
It requires additional customization. If you have needed skills you may try to do it.
Please take our apologies for inconveniences.
Regards,
Eva Kemp.
The issue related to '‘WooCommerce Products grid from VC does not honor menu_order sort’' has been successfully resolved, and the topic is now closed for further responses