Hi i was wondering how i could change the heading color in one page only, so it doesnt effect the other heading text colors on other pages.
This is the page i want to change:
Hi i was wondering how i could change the heading color in one page only, so it doesnt effect the other heading text colors on other pages.
This is the page i want to change:
You can achieve this by adding a unique class to the body tag of the product’s single page.
To do that, go to Theme Editor → Edit Code → theme. liquid.
Then, find the tag. If the body tag already contains a class, add this Liquid code after that class:
{% if template == 'product' %}product-page{% endif %}
This will add a unique class to the body tag of the product single page, allowing you to use it as a parent selector to change the color of that specific heading only.
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above
{%- if template == "product" -%}
{%- endif -%}
Result:
If it helps you, please like and mark it as the solution.
Best Regards
Sorry maybe i was not clear enough
I meant like the header menu on the top i want it to be black on the product page and to be white on the home page.
@Charmeclothing , ok change the code like this
{%- if template == "product" -%}
{%- endif -%}
Thank you so much it worked last question how can i change the logo so it becomes another logo on that page?
@Charmeclothing , could you share me the link to your another logo? I will send you the code
Yes of course, here you go
@Charmeclothing , change the previous code i sent you like this
{%- if template == "product" -%}
{%- endif -%}
Result: