Personalized checkout and custom promotions with Shopify Scripts
Hello! I’m looking for help. I have this section of code added to my product pages, but I want to exclude it from a certain page. I thought maybe by using the unless code, but I’m unsure of how to change it while still keeping the ability of it to be hidden if the meta field is blank. I hope this makes sense. Please help!
You may not need an unless.
Does something like the below help at all?
{% if product.metafields.custom.product_video != blank and product.handle != "foo" %}
...
{% endif %}
I would rarely add the handle into an if statement like this and would be more likely to start added a list of allowed (or blocked) pages and comparing against that. If you think you'll only need that one product page to ignore that the above code might be enough for now.
{% if product.metafields.custom.product_video.value != blank %}
//your iframe here...
{% endif %}
User | RANK |
---|---|
4 | |
2 | |
2 | |
2 | |
2 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023