Title: Hide Elements
Last modified: May 30, 2022

---

# Hide Elements

 *  Resolved [briancraw](https://wordpress.org/support/users/briancraw/)
 * (@briancraw)
 * [4 years ago](https://wordpress.org/support/topic/hide-elements-3/)
 * Hello,
 * I would like to hide my normal header when using PWA and will replace with widget.
 * I am trying this without success.
 *     ```
       .pwaforwp .gc-header  {
       display: none!important;
       }
       ```
   
 * Can you please let me know what code to both hide and show and element using 
   PWA for WP?
 * Thanks in advance! Brian

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [4 years ago](https://wordpress.org/support/topic/hide-elements-3/#post-15692059)
 * Can you please share the screengrab of what you trying to achieve? So that we
   will help you accordingly to resolve it.
 *  Thread Starter [briancraw](https://wordpress.org/support/users/briancraw/)
 * (@briancraw)
 * [4 years ago](https://wordpress.org/support/topic/hide-elements-3/#post-15692098)
 * Good morning and thanks for replying.
 * I would like to hide certain elements and can’t find the right css.
 * Please see screenshot for victoriouschristians.com .
    [Image](https://victoriouschristians-media.nyc3.digitaloceanspaces.com/wp-content/uploads/2022/05/30131724/pwa.png)
 * FYI.. Will purchase premium after first of June.
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [4 years ago](https://wordpress.org/support/topic/hide-elements-3/#post-15694495)
 * Can you please give it a try by referring to the below code and let us know back
   if it works or not? So that we will assist you accordingly to resolve it.
 * Code:
 *     ```
       .page-id-5 .gc-header {
       	display: none;
       }
       ```
   
 *  Thread Starter [briancraw](https://wordpress.org/support/users/briancraw/)
 * (@briancraw)
 * [4 years ago](https://wordpress.org/support/topic/hide-elements-3/#post-15695125)
 * Unfortunately this results in removing header for both mobile and PWA. I need
   to remove only for PWA. Thanks
 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-elements-3/#post-15701869)
 * Sorry for the previous response. It’s not possible to hide the header in PWA 
   only from CSS. we need to add JS for tat. Can you please add the following JS
   and let us know back if it works or not? So that we will assist you accordingly
   to resolve it.
 * Code:
 *     ```
       if(window.matchMedia('(display-mode: standalone)').matches) { 
               document.getElementsByClassName('gc-js-header').style.display = "none";
           }
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Hide Elements’ is closed to new replies.

 * ![](https://ps.w.org/pwa-for-wp/assets/icon-256x256.png?rev=1939317)
 * [PWA for WP - Progressive Web Apps Made Simple](https://wordpress.org/plugins/pwa-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pwa-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pwa-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/pwa-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pwa-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pwa-for-wp/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Magazine3](https://wordpress.org/support/users/magazine3/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/hide-elements-3/#post-15701869)
 * Status: resolved