Skip to product information
1 of 1
Published:2023.12.17

Example of settings to hide a section on a product page of the Shopify theme "Dawn" if the specified metafield is not set

Example of settings to hide a section on a product page of the Shopify theme "Dawn" if the specified metafield is not set

Applications

  • Product information management and editing
View full details

In Shopify, you can use metafields to display different content for each product while using a common template. However, it is important to note that if the metafield is empty, it will be forcibly displayed as blank. We recommend adding settings to take into account cases where there is no content.


Example of setting to hide a section on a product page in the "Dawn" theme if the specified meta field is not set


[Settings Step 1] Add the scheme to "featured-collection.liquid" and the label to "ja.schema.json"


[Settings Step 2] Modify the code in "featured-collection.liquid"


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Added schema to "featured-collection.liquid"


Add a label to "ja.schema.json"


Modify the code in "featured-collection...

Related Post