- This topic has 18 replies, 2 voices, and was last updated 1 year, 7 months ago by
Leo.
-
AuthorPosts
-
April 19, 2019 at 10:03 am #873676
Martin
Hi
Total novice here so I’ll apologise upfront.
I am trying to replicate and improve this site – https://dev-50310.co.uk, made with ark theme on https://dev-00135.co.uk/ using a combination of GP and Elementor.
I have managed to achieve the desired header/sticky effect I was after at https://dev-00135.co.uk/ but I have pages that require a different logo which changes to a different logo on scroll. Basically whats happening in the navigation area at https://dev-50310.co.uk/dream-team/ and it’s 4 sub pages.
Reading through previous posts has confused me so I thought it might be easier to ask you guys to at least point me to the definitive answer?
I am using svg logos as well, if that affects anything.
Many thanks
Martin
GP Premium 1.7.8April 19, 2019 at 10:05 am #873678Leo
StaffCustomer SupportHi there,
This should help:
https://docs.generatepress.com/article/navigation-as-a-header/#different-logo-and-navigation-colorsLet me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 3:34 am #874082Martin
Hi Leo
Thanks for quick reply.
I’m still missing something.
At https://dev-00135.co.uk/dream-team/, the logo reverts to the main logo on scroll.
These are the settings.
In addition, both images are visible in the mobile view.
I tried removing the site logo in the customizer and then I didn’t have a logo showing at all.
April 20, 2019 at 10:18 am #874425Leo
StaffCustomer SupportSorry not sure if I’m following. On desktop, I thought you wanted the logo to change on scroll?
What is the problem currently?
The mobile issue is weird. I’ll take a look if I can replicate it on my install π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 10:36 am #874436Leo
StaffCustomer SupportHmm can’t seem to replicate it on my install. The page hero one should replace the one in the customizer and not showing both.
So this logo is what you’ve uploaded in the customizer as the mobile header logo?
https://www.screencast.com/t/VWhHLJXJp
https://docs.generatepress.com/article/mobile-header/Any caching plugins or server cache?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 10:39 am #874439Martin
Hi Leo
Thanks for getting back.
Yes, on desktop I am trying to replicate this.
This appears to be working fine.
On the pages where I want a different logo to appear, I am trying to replicate this.
– this part is working.
– this isn’t working, on scroll the ‘Main’ logo displays.
Happy to let you have access to have a look at some point if that would be quicker.
Many thanks
Martin
April 20, 2019 at 10:47 am #874443Leo
StaffCustomer SupportAhh ok. If you want the logo to stay consistent in static and sticky mode, then try this filter instead of using the page hero options:
https://docs.generatepress.com/article/generate_navigation_logo/As for the mobile header logo, I believe it’s a bug.
The issue is solved if you choose Merge instead of Merge on desktop only right?
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 20, 2019 at 11:03 am #874449Martin
Hi Leo
The issue is solved if you choose Merge instead of Merge on desktop only right?
Yes it does remove the extra logo but I had wanted to display the mobile as just the sticky with white background and coloured logo. If you’re saying that is not possible, no problem and I will go with that.
If you want the logo to stay consistent in static and sticky mode, then try this filter instead of using the page hero options
I wanted the logo to change from white initially and then change to the coloured logo on scroll – is that what you mean by consistent?
Many thanks
Martin
April 20, 2019 at 4:48 pm #874598Tom
Lead DeveloperLead DeveloperThis sounds like a bug. I’ll take a look ASAP and will let you know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 20, 2019 at 6:30 pm #874622Leo
StaffCustomer SupportDifferent logo after scroll β this isnβt working, on scroll the βMainβ logo displays.
This is when the filter is needed to change the navigation logo for that page.
Let me know if you need help with the code.
We will take a look at the double mobile header logo bug π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 21, 2019 at 8:57 am #875011Martin
Hi
Thanks for looking into.
I would appreciate some help with the code Leo.
I have 5 pages that this affects. Could you provide a template for me to fill in the blanks. I assume I would change category to page id for the 5 pages, 4 are child pages.
Snippets plugin is installed and I assume I select run everywhere?
Many thanks
Martin
April 21, 2019 at 10:49 am #875076Leo
StaffCustomer SupportTry this:
add_filter( 'generate_navigation_logo','lh_category_navigation_logo' ); function lh_category_navigation_logo( $logo ) { // Return our category logo URL if ( is_page( array( 1, 2, 3, 4, 5 ) ) ) { return 'URL TO YOUR CATEGORY LOGO'; } // Otherwise, return our default logo return $logo; }
More info from here: https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 21, 2019 at 11:14 am #875088Martin
Thanks Leo. Great for desktop but mobile still shows the incorrect logo on scroll.
Is there anything that can be done about that at the moment or is that due to the bug.
Thanks again, appreciate all your help.
Cheers
Martin
April 21, 2019 at 2:53 pm #875175Leo
StaffCustomer SupportAhh the sticky always handles differently.
Try this filter. The code should be very similar to above:
https://docs.generatepress.com/article/generate_mobile_header_logo/Let me know if you need more info π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 21, 2019 at 10:06 pm #875290Tom
Lead DeveloperLead DeveloperI believe I have the mobile logo issue fixed. Feel free to shoot me an email and I’ll send the updated version to test before releasing 1.8: https://generatepress.com/contact
Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.