WordPress.org

Support

Support » Themes and Templates » Font Attributes In WooCommerce Variations

Font Attributes In WooCommerce Variations

  • I’m curious if anyone knows which php file contains the parameters for the size and font used in product view for variations on WooCommerce. I have one product variation (size) and the word size is in black and very small making it hard to see and read on my theme (Verona) so if anyone could tell me which php file this might be in it would be most appreciated. I’ve tried looking in Single_product.php but don’t see it there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Harris,
    if you want to make the font bigger you don’t need to access the source file. A bit of CSS code should do the job.

    Can you plase share your site url so that I can give a look at it?

    Yes, but the client I am working for at the moment is trying to keep the site underwraps until final launch – what is the best way to get it to you and then we can post the solution here so others looking for help on the same might benefit?

    Normally in Woocommerce variations are ander the classes

    .variations_form .variations .label

    So maybe this code could work in theory:

    .variations_form .variations .label {
      font-size: nnpx;
    }

    Replace nn with the number of pixels size you want for the font.

    However that could not be enough to address correctly your message. It depends on your theme, if it adds other classes.

    Try my code, and let me know if it works

    Hmm no -here is the page in question, I can just remove the URL after you have had a chance to look 🙂

    This worked from my pc:

    .woocommerce div.product form.cart .variations td.label, .woocommerce #content div.product form.cart .variations td.label, .woocommerce-page div.product form.cart .variations td.label, .woocommerce-page #content div.product form.cart .variations td.label {
      font-size: 20px;
    }

    Try it and please let me know. You can also change font color from there if you want

    That worked perfectly! I just need to change the color now and add a little padding. Thank you so much for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Font Attributes In WooCommerce Variations’ is closed to new replies.
Skip to toolbar