Solved

how to add different class on home page and other page templates

ErSanjay
Shopify Partner
293 20 42

i want to change the design layout based on the home page and other subpages how I can apply css based on templates 

Business Owner & Shopify app developer - shopify consting - Full Stack Sofware Engineer
Er Sanjay
Accepted Solution (1)

ErSanjay
Shopify Partner
293 20 42

This is an accepted solution.

i found the answer on  https://www.shopify.in/partners/blog/92262598-creating-useful-css-hooks-in-liquid

 

edit your theme.liquid file 

 

 <main id="content" class=" {% if template == 'index' %}content_home_index{% else%}non_home
{% endif %}"  role="main">
Business Owner & Shopify app developer - shopify consting - Full Stack Sofware Engineer
Er Sanjay

View solution in original post

Reply 1 (1)

ErSanjay
Shopify Partner
293 20 42

This is an accepted solution.

i found the answer on  https://www.shopify.in/partners/blog/92262598-creating-useful-css-hooks-in-liquid

 

edit your theme.liquid file 

 

 <main id="content" class=" {% if template == 'index' %}content_home_index{% else%}non_home
{% endif %}"  role="main">
Business Owner & Shopify app developer - shopify consting - Full Stack Sofware Engineer
Er Sanjay