Support » Plugin: WooCommerce » woocommerce category shortcode orderby

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    You may only use the orderby args get_terms supports. https://developer.wordpress.org/reference/functions/get_terms/

    ‘orderby’
    (string) Field(s) to order terms by. Accepts term fields (‘name’, ‘slug’, ‘term_group’, ‘term_id’, ‘id’, ‘description’), ‘count’ for term taxonomy count, ‘include’ to match the ‘order’ of the $include param, ‘meta_value’, ‘meta_value_num’, the value of $meta_key, the array keys of $meta_query, or ‘none’ to omit the ORDER BY clause. Defaults to ‘name’.

    Sorry but I don’t understand totally your answer. I think you are saying that the orderby accepts only (‘name’, ‘slug’, ‘term_group’, ‘term_id’, ‘id’, ‘description’). I followed a tutorial to order products by menu_order and it works fine. I want to do the same with categories. Is it possible?

    Plugin Author Mike Jolley

    (@mikejolley)

    It’s not. Categories don’t have a ‘menu order’.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘woocommerce category shortcode orderby’ is closed to new replies.