Select and style the first letter of a paragraph in Shopify

Enercos - Single Product eCommerce Shopify Theme

Today, I will guide everyone select and style the first letter of a paragraph in Shopify (blog content, page, product description,..).

first letter

We need to combine Shopify liquid code with Javascript code to do this.

Firts, We need get first word in this paragraph. It’s easy with Shopify liquid.

Next, We will add class for this word. Still will be Shopify liquid.

Next, We will change the new word into this paragraph.

Finished the code with Shopify. Next, We will use Javascript code.

Now, with Class you added into this word and this first letter you can edit CSS code for them.

Done! Good luck

Huynh Mai Anh Kiet

You may also like...

Leave a Reply

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