WordPress.org

Forums

Font Attributes In WooCommerce Variations (7 posts)

  1. HarrisSakalis
    Member
    Posted 1 year ago #

    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.

  2. Giulio 'the geek'
    Member
    Posted 1 year ago #

    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?

  3. HarrisSakalis
    Member
    Posted 1 year ago #

    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?

  4. Giulio 'the geek'
    Member
    Posted 1 year ago #

    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

  5. HarrisSakalis
    Member
    Posted 1 year ago #

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

  6. Giulio 'the geek'
    Member
    Posted 1 year ago #

    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

  7. HarrisSakalis
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic