How to change the heading text color, in only the all products page.

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:

https://aa1250-cc.myshopify.com

Hi @Charmeclothing

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 EditorEdit Codetheme. 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.

@Charmeclothing ,

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 :blush:

Sorry maybe i was not clear enough :slightly_smiling_face:

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 -%}
1 Like

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 :slightly_smiling_face:

https://cdn.shopify.com/s/files/1/0901/9798/3573/files/Etoile_Elegante-4-removebg-preview_1.png?v=1727802663

@Charmeclothing , change the previous code i sent you like this

{%- if template == "product" -%}

{%- endif -%}

Result:

1 Like