need to add under the shipping availability, but not to appear when no content is added?
Hi @ar0305
You can try this code.
{%- if product.metafields.custom.shipping_availability != blank -%}
{{product.metafields.custom.shipping_availability.value}}
{% endif %}
Hi @ar0305
Step 1: Create a Metafield for Shipping Availability
Go to your Shopify Admin.
Navigate to Settings > Custom data > Metafields.
Select Products or the appropriate resource type.
Click Add definition.
Create a metafield definition for your shipping availability, such as:
Namespace: shipping
Key: availability_info
Content type: Single line text (or any other type that suits your needs)
Step 2: Add Content to the Metafield
Go to your Products section in the Shopify Admin.
Select a product where you want to add shipping availability information.
Scroll down to the Metafields section.
Enter the relevant shipping information in the metafield you created (availability_info).
Save the product.
Step 3: Modify Your Theme Code
Now, you need to modify the relevant Liquid file in your theme to display the metafield only if it has content.
Go to your Shopify Admin.
Navigate to Online Store > Themes.
Click on Actions > Edit code on the theme you are using.
Find the file where the shipping availability is displayed. This is usually in product-template.liquid or product-form.liquid.
Add the following code snippet where you want the shipping availability to be displayed:
{% if product.metafields.shipping.availability_info != blank %}
### Shipping Availability
{{ product.metafields.shipping.availability_info }}
{% endif %}
