- This topic has 18 replies, 2 voices, and was last updated 5 years, 10 months ago by Todd.
-
AuthorPosts
-
June 14, 2018 at 1:58 pm #600299Todd
Hello, I am trying to get a logo in the header to overwrite with a page header logo so that it reverses out or is it white. I have uploaded it in the page header settings and have tried everything I can think of and can’t get it to work. Both the current logo in the header and the Reverse logo that I want to overwrite are SVG files.
June 14, 2018 at 8:38 pm #600440TomLead DeveloperLead DeveloperHi Todd,
There’s currently a bug when trying to replace the site logo when a retina logo is added.
Since you’re using an SVG, you don’t need a retina logo. If you remove it in “Customize > Site Identity”, the custom logo in your Page Header should work π
June 14, 2018 at 9:10 pm #600451ToddYes, that worked. Thank you!
June 15, 2018 at 9:04 am #600901TomLead DeveloperLead DeveloperNo problem π
June 15, 2018 at 10:47 am #600975ToddI did notice that the Overwrite logo does not show up in mobile?
Do I have to change that with CSS for those pages?
June 15, 2018 at 7:41 pm #601213TomLead DeveloperLead DeveloperAh yes, the mobile header option is missing an option in Page Header as well.
Page Header is undergoing a re-write right now, which will be available in GPP 1.7.
June 16, 2018 at 9:10 am #601573ToddIs there a good way to target the CSS with a class and replace the header logo in Mobile for all the headers that have a logo that is being overwritten until GP 1.7 is available?
If not, .page id, .page-id ?
I looked for I support articles related to this and it looks like you link to some CSS off of the following support topic but it seems the CSS is more related to showing side bars:
https://generatepress.com/forums/topic/override-mobile-logo-with-custom-page-logo/
Thank you.
June 16, 2018 at 9:37 am #601584TomLead DeveloperLead DeveloperYou would have to hook the second logo in:
add_action( 'generate_inside_mobile_header', 'tu_add_custom_mobile_header' ); function tu_add_custom_mobile_header() { ?> <div class="site-logo mobile-header-logo page-header-mobile-logo"> <a href="URL TO HOMEPAGE" title="TITLE OF SITE" rel="home"> <img class="header-image" src="URL TO IMAGE" alt="TITLE OF SITE"> </a> </div> <?php }
Then add this CSS:
.page-header-mobile-logo { display: none; } @media (max-width: 768px) { .page-header-content .mobile-header-logo { display: none; } .page-header-content .page-header-mobile-logo { display: block; } }
That should do it π
June 16, 2018 at 10:40 am #601616ToddBrilliant, works like a charm. Best customer service in the world. Thank you.
So I would just disable this snippet once GP 1.7 releases? And in GP 1.7 this will just work right out of the page header when a logo is set to overwrite?
And what is the best way to target the Search Icon and Hamburger for the these headers so I can reverse these out of the background also.
June 16, 2018 at 9:57 pm #601844TomLead DeveloperLead DeveloperNo problem!
In 1.7 there will be a retina option inside the actual Page Header settings that you’ll want to use.
That’s strange – those links should be white.
Try this:
.generate-merged-header #mobile-header:not(.toggled) .menu-toggle, .generate-merged-header #mobile-header .mobile-bar-items a, { color: #fff; }
June 17, 2018 at 3:14 pm #602270ToddThank you.
The last problem that I have is when the nav is sticky on mobile the logo and nav elements now are white on white on these merged pages. So it seems that The logo and nav elements in this instance has to switch back to normal to show up on white. Is there a way to address that?
June 17, 2018 at 9:46 pm #602348TomLead DeveloperLead DeveloperAh yea, that’s a problem I need to address within the plugin. Perhaps it would be better to keep the mobile header as is (before the tweak), and un-merge it on mobile?
Let me know π
June 18, 2018 at 6:41 am #602635ToddYes, I would be good with that but how do I change that for mobile?
June 18, 2018 at 11:10 am #602906TomLead DeveloperLead DeveloperRight now it looks like your navigation doesn’t have a background color in “Customize > Colors > Primary Navigation”.
If you could set those colors up, I can give you some CSS to make sure the mobile header keeps those colors instead of going transparent.
June 18, 2018 at 12:39 pm #602960ToddI have set the bg color to white.
-
AuthorPosts
- You must be logged in to reply to this topic.