Title: Swatches problem
Last modified: May 23, 2022

---

# Swatches problem

 *  Resolved [goldfish94](https://wordpress.org/support/users/goldfish94/)
 * (@goldfish94)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/)
 * Hello, there is a problem when using the Swatches function in your plugin. If
   the names of the attributes are wide, then they go beyond the boundaries of the
   button, could you tell me how to adapt the width of the buttons to the width 
   of the text?
 * [⌊1⌉⌊1⌉[
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fswatches-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [RosendoLabs](https://wordpress.org/support/users/drosendo/)
 * (@drosendo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15670284)
 * Hello,
 * You can add a custom css:
 *     ```
       span.swatch.swatch-label {
           width: auto!important;
           padding: 0px 6px;
       }
       ```
   
 * Does it fix it?
 *  Thread Starter [goldfish94](https://wordpress.org/support/users/goldfish94/)
 * (@goldfish94)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15670737)
 * Thanks, it works!
 * I also noticed that the buttons do not work in some themes, for example, switching
   variations on the homepage in the woodmart theme does not work (this is an ajax
   function, after clicking on the “select parameters” button, a selection of parameters
   appears)
 * [⌊image⌉⌊image⌉[
    Is it probably difficult to fix this without strong interference
   in the plugin code? Or what kind of life hacks are there to disable your plugin
   in specific pages (in this case, me need to disable the plugin on the home page)
    -  This reply was modified 3 years, 11 months ago by [goldfish94](https://wordpress.org/support/users/goldfish94/).
 *  Plugin Author [RosendoLabs](https://wordpress.org/support/users/drosendo/)
 * (@drosendo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15670783)
 * Hello,
 * The swatches is made to work only on product page. I did not make any code to
   work on Ajax loaded prodcuts.
 * Is that what you are refering too? SVI will still work well with other swatches
   plugin if you decide to usem them instead.
 * Cheers,
    David
 *  Thread Starter [goldfish94](https://wordpress.org/support/users/goldfish94/)
 * (@goldfish94)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15671479)
 * Look, the classes and structure of the buttons are different from the standard
   theme buttons, your buttons are wrapped in a span tag but the standard buttons
   are placed in a div,
 * [⌊2022-05-23-223917⌉⌊2022-05-23-223917⌉[
 * woodmart standard operating buttons:
    [⌊2022-05-23-2240212⌉](https://ibb.co/Y8hJrM1)
 * maybe that’s the reason, it’s probably hard to adapt? And will it be paid?
 *  Thread Starter [goldfish94](https://wordpress.org/support/users/goldfish94/)
 * (@goldfish94)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15671506)
 * del
    -  This reply was modified 3 years, 11 months ago by [goldfish94](https://wordpress.org/support/users/goldfish94/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Swatches problem’ is closed to new replies.

 * ![](https://ps.w.org/smart-variations-images/assets/icon-256x256.png?rev=2094600)
 * [Smart Variations Images & Swatches for WooCommerce](https://wordpress.org/plugins/smart-variations-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-variations-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-variations-images/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-variations-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-variations-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-variations-images/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [goldfish94](https://wordpress.org/support/users/goldfish94/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/swatches-problem/#post-15671506)
 * Status: resolved