• Hi,
    first of all thanks for this great plugin!

    I was wondering, is there a way to customize your code in order to have it give the variations different classes? (each tr should have its own class).
    I have max 2 variations (size & color) and currently they appear underneath each other. I’d rather have them appear next to each other so that they dont take up that much space.

    thanks a lot for your help.
    Best regards,

    https://www.ads-software.com/plugins/wc-variations-radio-buttons/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tabasco86

    (@tabasco86)

    I saw this post only after posting this, sorry.
    https://www.ads-software.com/support/topic/variations-on-same-line
    but it didnt resolve the issue…

    Plugin Author mantish

    (@mantish)

    Hi,
    The template code is not customizable, but you can always use pseudo-classes like :nth-child or :nth-of-type

    I just hacked the file variable.php and replaced line 72:

    print_attribute_radio( $checked_value, $option, $option, $sanitized_name );

    with this:

    $optionClean = preg_replace('/[^A-Za-z0-9]/', "", $option); echo '<div class="option-' . $optionClean . '-wrapper">'; print_attribute_radio( $checked_value, $option, $option, $sanitized_name ); echo '</div>';

    This adds a div wrapper around each option with classes such as .option-VariationName-wrapper

    • This reply was modified 7 years, 8 months ago by bobfries.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I give variations different classes?’ is closed to new replies.