Archived topic
merged transparent header on mobile
21 replies · Started by David on October 23, 2017
When the if statement is added, the code won't execute on the front page?
no it doesn't
Huh? The code is doing exactly what it is supposed to do to me.
What's supposed to happen?
First of all you are doing the opposite of what I suggested which is using the snippet to switch out the sticky logo: https://generatepress.com/forums/topic/merged-transparent-header-on-mobile/#post-408843
I would suggest doing it that way.
Secondly this statement: <?php if ( ! is_front_page() ) : ?> is preventing the code from being execute on the front page, maybe what you are looking for is: <?php if ( is_front_page() ) : ?> so it only executes on the front page?
Idiot move.. thanks leo sorry. This way seems to fit the bill for what I am looking to accomplish I only needed logo swap for homepage. if I did the sticky logo swap then I would have had to change my mobile header logo in customizer sitewide swap notstuck mobile header logo to make it white right? I'm looking to do the way u say but this works perfect is it better code practices?
I adjusted the CSS so that this whole method should only apply to the home page: https://generatepress.com/forums/topic/merged-transparent-header-on-mobile/#post-408843
You should upload the static logo in the customizer.