- This topic has 5 replies, 4 voices, and was last updated 6 years, 10 months ago by
Leo.
-
AuthorPosts
-
July 10, 2018 at 8:58 am #620364
Michael
Hi Support
I need to show a different navigation logo for the sticky menu on mobile. I’ve got the menu to show different logos for the normal nav and the sticky nav on desktop views but this doesn’t work for mobile because there is only one ‘slot’ for the mobile nav logo which displays on both the normal and sticky menus.
Any help appreciated
July 10, 2018 at 9:29 am #620394David
StaffCustomer SupportHi there,
you can use the Mobile header – it has its own logo:
July 11, 2018 at 1:20 am #620846Michael
Hi David
Thanks for responding. Yes, I’m using the mobile header but the issue is I would like to show a different logo for the standard mobile header to the sticky mobile header because the background colour is different. These screengrabs might explain what I mean:
Mobile header:
https://drive.google.com/file/d/1CE7sKhGPGoC1X2b_8WxAb4R9kkT9F_rk/viewSticky Mobile header:
https://drive.google.com/file/d/16ekWln4YMgdx440D7JihNMevUSU7mjXl/viewBTW, I tried this hack from Tom, but it didn’t work for me:
https://generatepress.com/forums/topic/change-logo-media-source-file-when-sticky/#post-304545Many thanks
July 11, 2018 at 9:26 am #621226Leo
StaffCustomer SupportWe would need some modification from Tom’s code.
Try this snippet:
add_action( 'generate_inside_mobile_header','lh_mobile_logos' ); function lh_mobile_logos() { ?> <div class="site-logo mobile-header-logo"> <img src="URL TO MOBILE HEADER LOGO" alt="" /> </div> <div class="site-logo mobile-header-logo sticky-only"> <img src="URL TO STICKY MOBILE HEADER LOGO" alt="" /> </div> <?php }And this CSS:
.mobile-header-logo.sticky-only { display: none; } .navigation-stick .mobile-header-logo.sticky-only { display: block; } .navigation-stick .mobile-header-logo:not(.sticky-only) { display: none; }May 27, 2019 at 1:09 pm #912539Dalia
Hi, this code works fine, but is it possible to adjust the logo and set the hamburger menu align to the right?
Thanks and best regards,
DaliaMay 27, 2019 at 1:12 pm #912542Leo
StaffCustomer SupportCan you open a new topic and link me to the site in question?
Thanks 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.