DOM improvements for {woo_product_on_sale}

Hi,

If we put {woo_product_on_sale} in an element like heading, it will be rendered as below.

-7%

But if only the spam tag is rendered in this situation, it will be more optimal. isn’t it?

-7%

Hey @jolia,

why do you use a heading element if you don’t want the heading to be output? Or am I misunderstanding something?

Best,

André

Hi @aslotta,
Because I want to display the sale badge in the query loop. So I must add it inside an element like heading. Is this wrong?

You could just use a regular text element, set its tag to be a span and use the :plain modifier:

CleanShot 2024-09-22 at 13.20.09

This results in:

<span class="brxe-text-basic">-20%</span>

Best,

André

1 Like

thank you @aslotta. It looks good now.