Ecommerce Shopify WordPress Discussion

Change header color per page to, one different color per page

I want to change the color of my header while maintaining the color of the main page. On my main page the letters are black and when I go to the other pages I want the letters to be white, my site is made in WordPress and with this code I change the color of my headeryour text #header .header_default, #header .header_default .stm_header_links a, #header .header_default .header_main_menu_wrapper a, #header .header_default .header_top_bar a, #header .header_default .right_buttons a > i, #header .header_default .header_top_bar { color: #EDEDED ; } I managed to change the color of the header but I need it to be white on the main page and on the other pages the letters be black
WordPress automatically adds home class to the body element of the front page of the site. So you can target the front page using these styles body.home #header .header_default, body.home #header .header_default .stm_header_links a, body.home #header .header_default .header_main_menu_wrapper a, body.home #header .header_default .header_top_bar a, body.home #header .header_default .right_buttons a > i, body.home #header .header_default .header_top_bar { color: white; } For the pages that are not homepage, you can use this: body:not(.home) #header .header_default, body:not(.home) #header .header_default .stm_header_links a, body:not(.home) #header .header_default .header_main_menu_wrapper a, body:not(.home) #header .header_default .header_top_bar a, body:not(.home) #header .header_default .right_buttons a > i, body:not(.home) #header .header_default .header_top_bar { color: black; }

February 17, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.