Site logo

Archived topic

merged transparent header on mobile

21 replies · Started by David on October 23, 2017

Viewing posts 16–22 of 22

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?

You can see the white logo when you land on frontpage? I have nothing when I scroll the blue one shows but when header is merged and transparent I just see empty space

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?

This archived topic is closed to new replies.