Hi Team,
As you can see in the image, I want to change product title as per different variants. Suppose If i click on off-white variant then it should change the color of the product but also i need product title should change. I don’t want apps. Would love if it can be done by code.
theme name:- Fashionopolism (Haute)
Hi @RoshanWeb ,
This is Theodore from PageFly - Shopify Page Builder App.
- Edit theme code: Go to Shopify admin > Online Store > Themes > Edit code for Fashionopolism (Haute) theme.
- Locate product.liquid: Find the product.liquid file in Assets.
- Modify title section: Find the code that displays the product title (might look like
{{ product.title }}
).
- Add variant logic: Use Liquid code to check the selected variant’s option (e.g., color) and modify the title accordingly. Here’s an example:
#
{{ product.title }}
{% if variant.option1 != 'Default' %} - {{ variant.option1 }}
{% endif %}
Best regards,
Theodore | PageFly
Hi Theodore,
Thank you for your reply, but I am not able to dynamically change title of the product. I put the snippet of code which you sent me but it is not helping, instead of title change there is id which can be seen on the product.