Support » Plugin: WooCommerce » Managing product attributes item value

  • Resolved fadipet

    (@fadipet)


    Hi, I have a food and beverage ecommerce and I’d like to use “Additional Informations” tab on single product page to show Ingredients of the product. Some ingredients need to be written in bold type due to possible allergies and intolerances but in the “value(s)” section I tried with <b> and but with no luck. Is it possible to fulfill my request?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Grigorij S. a11n

    (@grigaswp)

    Hi there,

    Thank you for reaching out!

    I understand that you’ve listed ingredients as attributes in attributes section of product settings but you’d like to make certain ingredients bold.

    HTML tags like <b></b> are stripped from both “Name:” and “Value(s):” fields so that will not work:

    https://d.pr/i/ZaxiEi

    The “Name:” field is bold by default though. If you are not using attributes anywhere else – perhaps you could use that difference and add some ingredients under “Name:” and some under “Values”? I see how this solution is far from ideal though.

    It might be possible to adjust some of the elements with some custom CSS but it might be tricky since the same CSS selector is used for each attribute:

    https://d.pr/i/3xaZxk

    Otherwise, I’d suggest using the “Description” section instead since it doesn’t strip HTML tags:

    https://d.pr/i/dCj59G

    https://d.pr/i/1rhXlD

    You could then change the name of the “Description” tab to anything else using a plugin like Loco Translate:

    https://wordpress.org/plugins/loco-translate/

    I hope this helps!

    Thread Starter fadipet

    (@fadipet)

    So much thanks. The solution i think to use is to write some ingredients in uppercase. Thanks again

    Plugin Support Grigorij S. a11n

    (@grigaswp)

    Hi there,

    The solution i think to use is to write some ingredients in uppercase.

    That indeed sounds like a viable workaround since it does not involve any hacking or code changes.

    I’ll be marking this thread as resolved but feel free to open a new thread and link to this one if you have further questions.

    Have a wonderful day ahead!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Managing product attributes item value’ is closed to new replies.