Remove Header On Blog Posts Not Main Site Mobile

  • Author
    Posts
  • #76691

    I used this CSS to remove the header on my blog posts for my mobile site:

    @media (max-width: 1024px) {
    #branding { display: none; }
    #search-2 { display: none; }
    #secondary { display: none; }

    }

    But I noticed that it removed it for the main landing page as well, is there a way that I can get this to just remove from the mobile blog posts and not the mobile landing page?

    -Angelo

    Website: angelofraboni.com

    #76758

    Zed
    Cryout Creations Team

    You can make that CSS more conditional:

    @media (max-width: 1024px) {
        body:not(.home) #branding { display: none; }
        body:not(.home) #search-2 { display: none; }
        body:not(.home) #secondary { display: none; }
    }

    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Remove Header On Blog Posts Not Main Site Mobile’ is closed to new replies.