FROM CACHE - en_header

Conditionally hide content on a product page

artooras
Shopify Partner
21 0 8

I'm building a public app that adds a banner/widget on a product page. However, I need to display the widget for certain product types only. My understanding is that the best way to do it is to add the widget to the liquid template, and then conditionally hide it when it shouldn't be displayed.

Where/when should this code for condition check be run? Is there a guide or tutorial for something similar? Or relevant documentation?

Thanks for any help!

Replies 2 (2)
PaulNewton
Shopify Partner
4332 321 930

https://shopify.dev/apps/online-store/theme-app-extensions 

https://shopify.dev/apps/online-store 

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
artooras
Shopify Partner
21 0 8