Add a featured product to homepage
(Skip this step if you have added one already)
- From Shopify Admin, access Online Store
- From the Theme you want to edit > click Customize
- Click Add section > find Featured product and click Add button
- Select the featured product you want and Save
Add code snippet
- From Shopify Admin, access Online store
- From the Themes you want to edit > click Action > Edit code
- Find featured-product.liquid file and paste the code snippet below to the end of this file
- Save changes and check the result on your homepage
{% if product %}
<script type=”text/javascript”>
var TPAConfigs = TPAConfigs || {}
TPAConfigs.product = {{ product | json }};
{% if product.metafields.tpa.config != blank %}
TPAConfigs.product.metafields = {{ product.metafields.tpa.config }}
{% endif %}
</script>
{% endif %}
If you cannot figure it out, don’t hesitate to contact us via email [email protected]. We are happy to help!