I'm making a website/webstore in WordPress/WooCommerce and ran into a problem with product attributes and swatches. We sell engraving materials (layered sheets) with a lot of different colors. So I put color as one of the atributes and in the atribute I inputed values. There are about 70 different colors and the problem is I cannot order the colors so that they form a "rainbow order" because WordPress or WooCommerce doesn't allow more than 20 atribute values per page when editing values and the order in which they are shown on site. It also doesn't allow to drag and drop a attribute value from one value page to another.

I have tried different orderings. But it would really need to be custom. I could input each color in desired order, however if later I need to input another color, I can't order it correctly.

In the picture is just an example. If I try to move greens order up (or down) on same page (page 2 of values) I can do that no problem, but I need to put it on page 1 of attribute values. atribute value order

  • 1
    Try this by putting in config.php file: define( ‘WC_MAX_PRODUCT_VARIATIONS’, 200 ); Commented Feb 28 at 9:31
  • you can use pre_get_posts to change the posts of the main query, it works on the admin side not just the frontend, but what you'd need to do to modify the WP_Query for the order of a WooCommerce attribute is not something you'd be able to ask here, questions about 3rd party plugins are offtopic here and not in this stacks scope
    – Tom J Nowell
    Commented Feb 28 at 16:53


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.