Strikethrough over price in WPBakery page builder

WPBakery page builder is quite popular for editing wordpress websites. You can use elements and design pages and posts easier with just a bit or even without knowing to code. But here is situation I found myself in recently while I was editing one client’s website.

They used “Price” element on pricing page. It all worked well untill they wanted to place old price with strigethrough line over, and new price next to it. The “price” element just don’t have that function. So I figured out small trick for it.

I placed old price as subtitle and new price in price field.

Then, at bottom of “price” element, I named custom class “oldprice”.

Then in theme files, I added this one rule to CSS:

That made strikethrough over subtitle in price element which is H4.

Here is how it looks finally on website:

Leave a Reply

Your email address will not be published. Required fields are marked *