Shopify themes, liquid, logos, and UX
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.
Solved w/ Custom liquid in theme editor
yes please try this way
{% if template contains 'index' %}
your custom script
{% endif %}
Where do you pace this? Just before </body> in theme.liquid?
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024