WooCommerce Products grid from VC does not honor menu_order sort

This topic has 7 replies, 2 voices, and was last updated 9 years, 5 months ago ago by Eva Kemp

  • Avatar: mcheck
    Michael
    Participant
    October 23, 2014 at 01:28

    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″]

    6 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    October 23, 2014 at 11:59

    Hello,

    You can add this attribute to the code: orderby="date"
    Replace the “date” with the term you need.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: mcheck
    Michael
    Participant
    October 23, 2014 at 17:21

    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?

    Avatar: mcheck
    Michael
    Participant
    October 23, 2014 at 17:39

    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!

    Avatar: mcheck
    Michael
    Participant
    October 23, 2014 at 17:41

    Ah, and I see that I can use:

    order="ASC"
    order="DESC"

    But orderby="menu_order" still does not work as expected.

    Avatar: mcheck
    Michael
    Participant
    October 23, 2014 at 19:27

    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.

    Avatar: Eva
    Eva Kemp
    Support staff
    October 24, 2014 at 14:11

    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.

  • Viewing 7 results - 1 through 7 (of 7 total)

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

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.