[Resolved] merged transparent header on mobile

Home Forums Support [Resolved] merged transparent header on mobile

Home Forums Support merged transparent header on mobile

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #410024
    Leo
    Staff
    Customer Support

    When the if statement is added, the code won’t execute on the front page?

    #410110
    David

    no it doesn’t

    #410249
    Leo
    Staff
    Customer Support

    Huh? The code is doing exactly what it is supposed to do to me.

    What’s supposed to happen?

    #410256
    David

    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

    #410288
    Leo
    Staff
    Customer Support

    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?

    #410301
    David

    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?

    #410407
    Leo
    Staff
    Customer Support

    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.

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.