Okay
  Public Ticket #923236
Hide header widget on interior pages on mobile
Closed

Comments

  •  2
    larkchiropractic started the conversation

    Hi,

    I'm trying to change it so the social header widget doesn't display on every page of http://www.larkchiropractic.com on mobile.

    I like that the site displays the header widgets on the home page. However, I don't want it to display on other interior pages while on mobile devices. I know I could use a css media query visibility: hidden on class header-widgets but that would also hide it on the front page as they share the same class. I believe I could change the classes on the homepage header widget so it doesn't apply my media query changes but I feel there is an easier option like creating a separate header widget for interior pages that then queries on mobile. 

    So how would you recommend me going about make these changes? Thanks.

  •  1,710
    Barry replied

    Hi there,

    This is possible with some CSS indeed. If you want to display the header widgets only on the home page and hide on all other pages (on mobile screens) you can use the following CSS. Please add via Appearance > Customize > Theme Options > Custom CSS:

    @media (max-width: 992px) { .header-widgets { display: none!important; } body.home .header-widgets { display: block!important; } }

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes