Shopify themes, liquid, logos, and UX
Hi,
I'm trying to render a snippet on the homepage featured-product section, or in the homepage in general. I've managed to render this snippet on the product page (for hiding the unavailable variants). But I have a featured product on the homepage, which also needs this. Can someone show me how to render this snippet properly so it will apply to the featured product on the homepage? Thanks!
This is my homepage: https://earlorange.com/
This is what I did on the Theme.liquid to render the snippet on the product page, it works well.
I want to render the 'Hide-variants' on the featured-product on my homepage, so the unavailable won't appear.
Solved! Go to the solution
This is an accepted solution.
Hello,
1. Create a new snippet in the "snippets" folder called "test-me"
2. Add some simple code just to make sure it renders, something like <p>hello from snippet</p>
3. Render it with {% include 'test-me' %}
If that shows up it means the snippet is being rendered properly. From there proceed to develop your own code.
Let me know whether it works.
Does anyone have experience with this or anything similar? If you can share some thought that'd be great. Thanks in advance!
Use {% include 'hide-variants' %}
I'd recommend making it lowercase as well. Instead of Hide rename it to hide.
Kind regards,
Diego
Hi Dantepw,
Thank you for the suggestion. I really appreciate it!
I tried the changes but it doesn't work 😞 Any clue where to double check?
Thanks,
Siemon
This is an accepted solution.
Hello,
1. Create a new snippet in the "snippets" folder called "test-me"
2. Add some simple code just to make sure it renders, something like <p>hello from snippet</p>
3. Render it with {% include 'test-me' %}
If that shows up it means the snippet is being rendered properly. From there proceed to develop your own code.
Let me know whether it works.
It works, thanks for the advice
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025