Archived topic
Logo color
5 replies · Started by Jusung on January 12, 2023
I am using logo image on the header.
I have 2 files, which are black and white.
On the front page, it shows white logo, but in other page, I wanna show black color logo.
Also, on the sticky menu, I need to show black log.
Is there a way to set the different logo color?
I have it as a file.
This is what I added
The post page ID is 80, So, put 80 and On the return URL, I used the file url in the media.
However It doesn't work. Also, I can I set this for stick menu..?
add_filter( 'generate_logo', function( $logo ) {
// Return our category logo URL
if ( is_page( 80 ) ) {
return 'URL';
}
// Otherwise, return our default logo
return $logo;
} );
Hi Jusung,
For the Sticky Nav logo, you can add a different logo through Appearance > Customize > Layout > Sticky Navigation.
For the logo on other Pages, you can utilize a Header Element. You can add a logo there. Reference: https://docs.generatepress.com/article/header-element-overview/#site-header
Make sure to setup the Display rule location to your preference.
There's no way to set a different logo color unless your logo is an SVG. You need to upload a different logo.
If you want to use a filter, you can use this: https://docs.generatepress.com/article/generate_logo_output/
I just changed the setting.
I made the default logo is black
and using filter, I set white logo on the front page.
However, on the sticky meny on the front page, I am seeing white logo.
I wanna see the black logo on the sticky meny on the front page.
Thank you!! everything works well now!!
I used filter!
You're welcome, Jusung!