Multiple Sort Query for Wordpress / Woocommerce

wordpress
woocommerce

#1

Greetings,
I am trying to do a multiple sort function for Woocommerce Product Attributes.

I have a Attribute named Frame so the taxonomy is pa_frame

get_terms(array('taxonomy' => 'pa_frame','orderby' => 'title','order' => 'DESC','hide_empty'=> false,'fields'=> 'all','offset'=> $offset,'number'=> $number));

So the above shows me a list of all frame types by title Descending.

Like this
Walnut White Frame Big
Walnut Red Frame Big
Walnut Pink Frame Small
Walnut Grey Frame Big
Walnut Green Frame Small

Now within that I have added a meta named Thickness - small and big

I am trying to sort using the default wordpress query but unsuccessful. Any idea how it can be done?

I know there is a meta sorting option, but its not working or I am coding it wrong. Any help?

So what I want to do is first show big frames descending and then the small frames.

So like

Walnut White Frame Big
Walnut Red Frame Big
Walnut Grey Frame Big

Walnut Pink Frame Small
Walnut Green Frame Small

and so on.


#2

Any help? Unable to generate query so that the content sorts in the order I want. Thanks


#3

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.