- This topic has 5 replies, 3 voices, and was last updated 4 years ago by
Leo.
-
AuthorPosts
-
March 4, 2019 at 4:54 pm #828892
Nicole
The site logo I have for desktop and tablet works great, but I need to use a cropped version of that photo, for the mobile site logo. In other words, I need to use a different photo for the mobile site logo. Is there some way to do that?
GeneratePress 2.2.2March 4, 2019 at 5:08 pm #828901Tom
Lead DeveloperLead DeveloperHi there,
Have you tried the Mobile Header option?: https://docs.generatepress.com/article/mobile-header/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 4, 2019 at 5:37 pm #828914Nicole
I want to use a cropped version of the desktop/tablet header (a separate image), exclusively for mobile. It would be a whole separate image. I want it to appear below the primary nav bar, just like it does for desktop and tablet view.
I have tried the mobile header option, but it is my understanding that the mobile header option ONLY lets me put the image inside the primary nav bar, and that’s not where I want it.
March 4, 2019 at 6:03 pm #828928Leo
StaffCustomer SupportTry this:
1. Create a new hook element:
https://docs.generatepress.com/article/hooks-element-overview/2. Copy and paste the HTML below as content and replace
https://HOME-PAGE-URL/
andhttps://MOBILE-LOGO-URL-HERE
with the actual URLs<div class="site-logo mobile-site-logo hide-on-desktop hide-on-tablet"> <a href="https://HOME-PAGE-URL/" title="Nicole Fraser Virtual Assistant" rel="home"> <img class="header-image" alt="Nicole Fraser Virtual Assistant" src="https://MOBILE-LOGO-URL-HERE" title="Nicole Fraser Virtual Assistant"> </a> </div>
3. Select
after_logo
in the Hook dropdown list.4. Under Display Rules, select Entire Site as Location.
5. Add this CSS to hide the desktop logo:
@media (max-width: 768px) { .site-logo:not(.mobile-site-logo) { display: none; } }
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 21, 2019 at 5:25 pm #846148Nicole
Sorry for the delayed response. I’ve been really busy. Your setup above worked like a charm! Nice work! Thank you so much!
March 21, 2019 at 6:29 pm #846174Leo
StaffCustomer SupportNo problem ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.