[Support request] Hide header (widgets) on WC shop page for bigger screens

Home Forums Support [Support request] Hide header (widgets) on WC shop page for bigger screens

Home Forums Support Hide header (widgets) on WC shop page for bigger screens

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #374659
    Daan van

    Hey again, I’m back, so sorry.

    I need filters on top of my shop page for mobile devices, for this purpose I have filter widgets in the left sidebar (for desktop/tablet view) and some in the header widget area (only for mobile). I hide them accordingly with a plugin.

    The use of the header leaves additional space above my products on the shop page when viewing on desktop/tablet.

    My thought: remove the header for devices with a screen above the size of a mobile phone.

    The code I thought might work was:


    @media
    (min-width: 768px) {
    .generate-page-header {
    display: none;
    }
    }

    I’m not using any headers or header widgets on different pages, so I’m fine with removing the header for tablet/desktop on all pages, but it would be even better if I can hide it only on WooCommerce related pages (I might use it in the future).

    So the real question:
    What is the best way to show the filters above the products on my shop page? If placing it in the header is the right and only answer.
    How can I hide the header on the shop page and other WC related pages (such as product category) on devices bigger than a mobile phone?

    #374730
    Leo
    Staff
    Customer Support

    Hi there,

    Little confused what you are trying to achieve. Can you provide a link to your site and show me what you have so far?

    Maybe checking out GP hooks?
    https://docs.generatepress.com/article/hooks-overview/
    http://demo.generatepress.com/hook-locations/

    We can use conditional tag to make it show only on WooCommerce page as well.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.