How to Use Swatches for Colors and Dropdowns for Sizes in WooCommerce
Content
Many WooCommerce store owners want the best of both worlds: the visual appeal of color swatches and the practicality of a standard dropdown for attributes with many options, like sizes. A common issue reported by users of the 'Variation Swatches for WooCommerce' plugin is that it automatically converts all attribute types to swatches, which isn't always ideal.
This behavior happens because the plugin has a global setting to enable swatches for all suitable attributes. Fortunately, the solution is straightforward and doesn't require any custom code.
How to Configure Selective Swatches
To use color swatches while keeping your size attribute as a standard dropdown, follow these steps:
- Navigate to your WordPress admin dashboard.
- Go to WooCommerce → Settings → Products → Variation swatches.
- Find the setting labeled "Enable Swatches" and uncheck the box. This global setting, when disabled, allows you to control swatches on a per-attribute basis. A user in Thread 21 confirmed this was the solution after receiving guidance from the plugin's support.
- Click "Save Changes".
Now, you need to configure each attribute individually:
- Go to Products → Attributes.
- Edit your "Color" attribute (or whatever you have named your color attribute).
- For the "Type" field, select "Color" from the dropdown menu. Save the changes.
- Next, edit your "Size" attribute.
- For the "Type" field, select "Select" from the dropdown menu. This will ensure it displays as a standard WooCommerce dropdown and not as button swatches. Save the changes.
This method, referenced in multiple threads (2, 3, 18, 21, 24), is the officially suggested way by the 'Variation Swatches for WooCommerce' team to achieve a mixed interface of swatches and dropdowns.
Troubleshooting Tip
If you have followed these steps and the size attribute is still displaying incorrectly, clear your website's cache (both any caching plugins you have and your browser cache) and check again. The changes should take effect immediately.
By configuring these settings, you can create a more user-friendly product page that caters to the specific needs of each product attribute.
Related Support Threads Support
-
Can’t apply a custom stylesheet to the pluginhttps://wordpress.org/support/topic/cant-apply-a-custom-stylesheet-to-the-plugin/
-
Display unselected swatcheshttps://wordpress.org/support/topic/display-unselected-swatches-2/
-
Color picker functionalityhttps://wordpress.org/support/topic/color-picker-functionality/
-
disable generating thumbshttps://wordpress.org/support/topic/disable-generating-thumbs/
-
Reset swatch to default value programaticallyhttps://wordpress.org/support/topic/reset-swatch-to-default-value-programatically/
-
selective dropdown conversionhttps://wordpress.org/support/topic/selective-dropdown-conversion/
-
Show and hide Swatches/Optionshttps://wordpress.org/support/topic/show-and-hide-swatches-options/
-
How to add button after size swatcheshttps://wordpress.org/support/topic/how-to-add-button-after-size-swatches/
-
customise size select fieldhttps://wordpress.org/support/topic/customise-size-select-field/
-
Selectively disable Swatches and show dropdown instead?https://wordpress.org/support/topic/selectively-disable-swatches-and-show-dropdown-instead/
-
disable swatches for some attributeshttps://wordpress.org/support/topic/disable-swatches-for-some-attributes/
-
How to disable swatches settings via custom plugin/themehttps://wordpress.org/support/topic/how-to-disable-swatches-settings-via-custom-plugin-theme/
-
For style Media queryhttps://wordpress.org/support/topic/for-style-media-query/
-
Scrolling to top when selectinghttps://wordpress.org/support/topic/scrolling-to-top-when-selecting/
-
Option to select the shades of the main colorhttps://wordpress.org/support/topic/option-to-select-the-shades-of-the-main-color/
-
Normal dropdown option?https://wordpress.org/support/topic/normal-dropdown-option/
-
Disabled Class is Delayedhttps://wordpress.org/support/topic/disabled-class-is-delayed/
-
Switch these parameters at any time without them being unclickablehttps://wordpress.org/support/topic/switch-these-parameters-at-any-time-without-them-being-unclickable/
-
Does the plugin support a template systemhttps://wordpress.org/support/topic/does-the-plugin-support-a-template-system/
-
Why inline CSS?https://wordpress.org/support/topic/why-inline-css/
-
Keep default drop down for sizes & quickviewhttps://wordpress.org/support/topic/keep-default-drop-down-for-sizes-quickview/
-
Hide Swatches settings from admin menuhttps://wordpress.org/support/topic/hide-swatches-settings-from-admin-menu/
-
new functions swatches pluginhttps://wordpress.org/support/topic/new-functions-swatches-plugin/
-
Can you enable for only some Attributes?https://wordpress.org/support/topic/can-you-enable-for-only-some-attributes/
-
Move Swatches Settings menuhttps://wordpress.org/support/topic/move-swatches-settings-menu/
-
Migration from ThemeAlien pluginhttps://wordpress.org/support/topic/migration-from-themealien-plugin-2/
-
Can I re-apply JavaSCript events?https://wordpress.org/support/topic/can-i-re-apply-javascript-events/
-
Seasonal Colorshttps://wordpress.org/support/topic/seasonal-colors/
-
Use Swatches only for color not for sizehttps://wordpress.org/support/topic/use-swatches-only-for-color-not-for-size/