Dawn - Homepage file

3 0 1

I want to add a JS script to my homepage. 

I managed to to do this by adding the script code before 
{% section 'footer' %}

in theme.liquid

However this adds it to every page. How can i do this just for the homepage? Which file would I need to edit.

Replies 2 (2)
3 0 1

Solved w/ Custom liquid in theme editor

Shopify Partner
24919 2497 9034


yes please try this way

{% if template contains 'index' %}
  your custom script 
{% endif %}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing