Archived topic
Site headers appears on mobile even if element is deactivated
13 replies · Started by Gilles on November 25, 2019
Hello
Since the last update, the header of the site appears on the mobile version of my site (see here : https://i.imgur.com/NPiTcAe.png) even when the element is deactivated ... It's good on a computer as you can see here (https://i.imgur.com/Rdo7fTB.jpg)
I specify that I do not want to disable the header on the entire site, but only on certain pages (sales pages and private area).
Thanks
Gilles
Hi there,
How are you disabling the header on those pages?
Using the disable element metabox or Elements?
Can you make sure the header is selected to be disabled on those pages (not just primary navigation)?
Let me know :)
Hi Leo
Yes of course. I said "even when the element is desactivated" (see here : https://i.imgur.com/X2DCGHU.jpg)...and it's ok with a computer...
So there's a problem only on mobile device
Can you guide me to the pages that aren't working?
Let me know :)
For exemple : https://www.un-jardin-bio.com/ebooks/mon-potager-au-naturel-mobile/
But it's the same with all pages where I deactivated header...
Can you clear and disable LiteSpeed Cache and let me have a look?
Thanks :)
Ok it's done
Ah ok that's a bug from the recent update.
Are you able to link me to all the pages that are having this problem?
Then we can use CSS to fix this until the patched version is released.
Sorry about that and let me know :)
There are dozens of pages (some of which are reserved for my clients ... you will not have access to them).
But here are some accessible:
https://www.un-jardin-bio.com/formations/prolongation-coaching-1-an-mobile/
https://www.un-jardin-bio.com/formations/coaching-1-an-pdv-mobile/
https://www.un-jardin-bio.com/formations/consoude-mobile/
Can I reactivate LiteSpeed ?
Here is the CSS you need for the 3 pages above:
@media (max-width: 768px) {
body.page-id-52462 #mobile-header,
body.page-id-52441 #mobile-header,
body.page-id-49075 #mobile-header {
display: none !important;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
As for other pages, you will need to identify the page-id-xxxx and keep adding on to the code:
https://www.competethemes.com/blog/find-page-id/
Let me know if you need more info and sorry for the inconvenience.
I've reported this bug and we will get it fixed asap.
Thanks :)
Ok
Thanks
Best regards
Gilles
Hey we actually have a workaround solution for now.
If you add this PHP snippet:
https://generatepress.com/forums/topic/gp-1-9-0-update/#post-1069229
Adding PHP: https://docs.generatepress.com/article/adding-php/
Then you shouldn't need the CSS above.
Let me know :)
Thanks
It works well !
Regards
Gilles
No problem :)