Product Attribute/Variation Sort Order Type
To change the attribute or variation sort order type alphabetically, by term ID, or a custom sort order:
In the left-hand menu, click Products and then click Attributes.
On the WooCommerce Attributes page, hover over the attribute you want to change (in this example Size) and click Edit.
In the Edit Attribute page, open the Default sort order dropdown menu.
There are four different options here. Custom ordering, Name, Name (numeric) and Term ID. Select the order you require and click Update. (In this example we are selecting Custom ordering).
You can now check you template to see if the ordering is correct. Make sure to clear any page caches if configured.
If you want a completely custom sort order for you attributes/variations, continue to the next step.
Custom Attribute/Variation Sort Order
If you selected Custom ordering in the previous step, you can now set the custom order of your attributes/variations.
In the left-hand menu, click Products and then click Attributes.
In the main Attributes page, hover over your attribute (in this example Size) and click Configure terms.
In the product attribute page (in this example Product Size), hover over the attribute and use the three lines to drag the attribute up or down. In this example we are moving the size M (medium) above L (large).
Once you drag and drop the attribute, the setting is saved automatically, you do not need to click save or update anywhere.
Now go to the Product page on the frontend of your website and check that the new custom order is correct. Make sure to clear any page caches if configured.
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
omg thank you. i was annoyed by this for FAR too long….
Thank you so much!!
Thank you very much sir
Is there a way to change attributes order not globally but INSIDE single product? My issue is to re-order author’s of books in my online bookstore in an arbitrary way for every single book (like they want), not alphabetically.
Thank you so much !! From Venezuela Thanks
Thank you so much for such very useful information
This really helped me. I was even thinking to find and purchase a plugin for this. Now, this solved.
Thank you…that’s twice this week that I’ve had to refer back to this….I appreciate it x
Hi, How do you order attributes like prices if they run over two or more pages?
@ Indy and others, if your terms keep reverting back to older when you leave the page :
Open you database in PHPMyadmin or any other DB edit tool and go to woocommerce_attribute_taxonomies table.
Look for your attribute and put manually in the attribute_orderby column : “menu_order” and save your edits.
Then you have to create a fake new attribute from the wp admin and then remove it so all attribute orders are reset and it’s working for me.
Hi, thanks for this but it is not working for me, just keep reverting to old order as soon as I leave the page, help!!
Thank you for the clear & quick answer, keep it up !
Same as Lisa and others : quick tip, easy fix, much time saved.
A huge thank you !
awesome, thanks for the quick tip – easy fix! Much appreciated.
I never leave comments on sites similar to this but this just saved me so much time and the question asking about multiple pages of sizes and your answer clarified everything and worked perfect. Thank you
We have products that have 2 pages of attributes. How can we move an atribute from one page to another?
For example:
US AIR FORCE Embroidered Nametag has 62 wing variations. We need to move the 2 variations to the end of the listing.
The product I’m referring to is here: nametags4u2.com/product/air-force-emb/
Frank
Please see comment below from Ajith.
https://devanswe.rs/change-woocommerce-variations-attributes-custom-sort-order/#comment-15133
WoooooW!!!, You are great. I was trying everything with no
You’re the best. I been trying for a long time with no sucess. Thanks a lot.
Hello, I am trying to change atributes order. In front end diplay I want color dropdown be before size dropdown. Is it possible? Thanks.
Hi guys,
I’m trying to change the value order (in attributes) in the backend so that in the additional information on the frontend the order matches. Unfortunately it seems when you add the values per attribute in the backend (on product page) it automatically refreshes the order to being alphabetical! This then appears alphabetical on the front end!
Any ideas how I can set the values to the order I want on a per product bases?
Many thanks
Matt
Very helpful. Thank you.
how to move attributes from 2nd page to 1st page?
You can adjust the pagination (Number of items per page) count under top screen options. Please increase to a larger number will solve your issue. https://i.imgur.com/1vSaspE.png
Thanks.
Thank you!!
This saved me too, Thkx
Thank You
Working properly.
You are great! Thank you.
Beautiful! Thank you :))
I’ve been fighting this for hours today!!! Your simple explanation fixed it for me, Thanks!
Amazing and super simple! <3
Very helpful. Thank you.
thank you
Thanks a ton for the blog post.
This saved me HOURS of work! Thank you so much!
Sorry not working for me – bugger I have tried for half an hour
Thank you for this in-depth tutorial. I am trying to work on product variations but not getting the actual results as I have already gone through several resources and following this resource to implement the product variation process. Can you please describe me further how to do this? This is the code that I think is somehow wrong. Is there any other way to set product variations? $variation_id = woo_insert_post( $variation_post ); $variation = new WooCommerce_Product_Variation( $variation_id ); foreach ($variation_data[‘attributes’] as $attribute => $term_name )
Nice, thank you so much !!
This is not working for me, when I reload the page it reverts to the default order, but the weird thing is that in each individual attribute, the order text field has the correct number
Hi,
First, Thanks for your guide.
I have small question, what should I do to change the order of variations from a different pages?
I’m not sure I understand the question. Can you elaborate on what you want to achieve please?
If you have an array of variations that span on to multiple pages. How do you drag and drop from page 1 to page 2. Where do you drag the three lines to in order to take the attribute to the next page.
i.e. Size ( 0-3 … 19-20 )
When you’re on the terms page, on the top right there is SCREEN OPTIONS. There you can choose how many terms are visible on this page. Increase it to as much as you need.
Thanks Paul, easy when you know how.