my header is transparent on only the homepage but white for the rest of the website so having black text and black logos and icons dosnt work on the homepage i need help changing them.
so i need help with changing the colour of the header text and icons to WHITE but only on the homepage.
is it also possible to have a different logo for the homepage i have a white logo that i would like it to be but the other black logo for the rest of the website.
Hello @LeviFurey
would you like to share your store URL and password if any please.
so i can check and provide you possible solution for your question.
For the logo image, we can’t change its color from black to white. If you have a logo with white text, would you mind uploading it to your Shopify admin > Files here: https://prnt.sc/_yuENIWC9-9x - then please share with me the image’s link so that we can provide you with a suitable code to apply this logo image for only Home page.
i tried the code it works partially it changed the colour of the text and icons but i only want the colour to be changed for the homepage not for the whole website.
iv tried the code and it works however on mobile as the text is white and when you open the sidemenu as the background is white so you cannot see the text.
Open the theme.liquid file => Click on the content => Press Ctrl + F (or Command + F on Mac) and search for the keyword <body. https://prnt.sc/Dn7bj6BZ1ct8
Insert the following code right below the line containing the <body tag you found in Step 2. https://prnt.sc/GrINaMKMkQ9M
in the first picture, when the dropdown arrow is clicked the text and logo on the header will revert back to black on desktop, mobile is fine. can it be made so when the dropdown arrow is clicked the text and logo will remain white on desktop only.
in the second image, the country/currency converter text remains white can it be changed to black on desktop only its fine mobile.
this worked for the second issue (currency/country converter) the text is now black.
but did not work for the first issue (dropdown menu text colour) the text is now white, however the header text and logo will stay white.
i used ai and found a solution here it is:
{%- style -%}
{%- if request.page_type == "index" -%}
/* Change all header text to white on the homepage, except dropdowns */
.header:not(:has(details.menu-drawer-container.menu-opening[open])) *:not(#MegaMenu-Content-1 *):not(.header__submenu *):not(.disclosure__list-wrapper *) {
color: white !important;
}
/* Ensure the logo is inverted */
.header:not(:has(details.menu-drawer-container.menu-opening[open])) .header__heading-logo-wrapper img {
-webkit-filter: invert(100%);
filter: invert(100%);
}
/* Force the main dropdown menu text to black */
#MegaMenu-Content-1,
#MegaMenu-Content-1 .mega-menu__link {
color: black !important;
}
/* Ensure the dropdown menu background stays white */
#MegaMenu-Content-1 {
background-color: white !important;
}
/* Preserve currency/country selector dropdown text as black */
.disclosure__list-wrapper {
color: black !important;
}
/* Optional: Ensure the currency/country selector dropdown background stays white */
.disclosure__list-wrapper {
background-color: white !important;
}
{%- endif -%}
{%- endstyle -%}