Strikethrough or Line Through on Product Title

Strikethrough or Line Through on Product Title

KH24
Shopify Partner
2 0 0

How do you add a strikethrough on a word in the product title? I also want to make a word BOLD. Like the image below.

Shopify - Product Title Strikethrough.jpg

 

 

I'm working with Studio Theme 15.0.0, Shopify 2.0
I can't share the store link as it is a confidential project.

Replies 5 (5)

niraj_patel
Shopify Partner
2391 516 515

Hello @KH24 here is an example, if you want to strikethrough and bold the word "Old" in the product title "Old Price New Price",

you can write:
<del class="strikethrough">Old</del> 
Css :

.strikethrough{

    font-weight:900;

}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
KH24
Shopify Partner
2 0 0

Where do I add these?

niraj_patel
Shopify Partner
2391 516 515

In main product liquid file.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

Asad-Mahmood
Shopify Partner
321 53 63

You can do this without editing in code file

While adding product in shopify admin use this in product title field

THE <b>BUILD<s> BREAK</s></b> ONE

If my solution has been helpful, you can consider supporting me via Buy Me a Coffee.
Hire me: asadmahmood8470@gmail.com
WhatsApp
Fiver




SetuBridge_
Shopify Partner
263 61 86

If you are using the "Studio" theme and want to add "Strikethrough" to the product title on both the "Collection" and "Product" pages, follow these steps:

1. Go to Online Store -> Theme -> Edit code.

For Product Page:
A. Open your Section/main-product.liquid file.
B. Add the <del></del> tag around the product title where you want it to appear:
<h1><del> {{ product.title | escape }} </del></h1>
https://prnt.sc/1Ec9p_ouZxn6

For Collection Page:
A. Open your Snippets/card-product.liquid file.
B. The theme has multiple instances of the card__heading class. Find the one you are using and add the <del></del> tag around the product title:
https://prnt.sc/vOfNL8r_YqCW

2. To make the text bold, add the following CSS in the theme.liquid file:

<style>
  .custom-del-tag{
    font-weight:bold;
  }
</style>

If you do not want to edit the theme code, you can add this tag in your product title directly.
THE <b>BUILD<s> BREAK</s></b> ONE

Screenshot:
Product Page: https://prnt.sc/7xBOe-kTn-w8
Collection Page: https://prnt.sc/wRKWzJ5F06k2

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

Shopify Partner | Shopify E-Commerce Solutions Provider