How to add CSS to homepage only in Shopify?

Regarding your issue, we like to recommend this solution:

Go to Online Store -> Theme -> Edit Code
Go to theme.liquid
Locate and add the following code below:

{% if template.name == \”index\” %}
{% style %}
.class-name{
background: Blue;
}
{% endstyle %}
{% endif %}

Related Posts
How to create custom checkout link in shopify site

Customers can be guided through a customized purchasing process with the use of a checkout link. You can specify which Read more

How to make Shopify store password protected

How to make Shopify store password protected? Your online shop needs a password. By incorporating a password security page, you Read more

How to add Buy Button sales channel in shopify

The Buy Button sales channel must be added to your Shopify admin\'s Sales channels section before a new Buy Button Read more

How to Auto-Add Products & Discount to Shopify Cart from URL

Shopping Cart Product and Discount Automatically Added in Shopify using a URL Learn the simple process for creating unique links Read more

Shopify Apply A Code To Only The Home Page only

This depends on what the goal is, without better specifics it\'s all guesswork. You can show specific code to only Read more

How to make Shopify Custom Font Working? or How To Add A CUSTOM FONT To Your Shopify Site?

Have you ever thought how to add a custom font to Shopify? With this Shopify guide, you can now do Read more

Scroll to Top