- This topic has 12 replies, 3 voices, and was last updated 4 years, 2 months ago by David.
-
AuthorPosts
-
February 4, 2020 at 12:06 pm #1154540_blank
Hello, is it possible to hide the menue on certrain pages?
Thank you very much
Best
HannahFebruary 4, 2020 at 1:11 pm #1154605LeoStaffCustomer SupportHi there,
You can use the disable element metabox for each page:
https://docs.generatepress.com/article/disable-elements-overview/Or create a layout element to take care of multiple pages:
https://docs.generatepress.com/article/layout-element-overview/#disable-elementLet me know if this helps π
February 4, 2020 at 5:44 pm #1154779_blankHi dear Leo,
thank you so much for your quick response.
I did not specify my issue enough.
What I would like to do, is to hide my standard main menu and switch it with an elementor menue. On Desktop this works well so far but on mobile it does not.
thank you so much for your help πFebruary 4, 2020 at 10:03 pm #1154883LeoStaffCustomer SupportSo do you want to hide the entire mobile header or just the toggle?
February 7, 2020 at 6:17 am #1157822_blankWhat do you mean by toggle?
I think I would like to hide the entire mobile header on certrain pages. (all pages created by one author)
My main business is a product, so my website is about this product.
Now I am under the same brand also organizing a festival.
To not get people confused about the product and the festival, i have for each its own header and footer menu (created with elementor)
This works wonderful on desktop but on mobile I have currently both menus. This is an example page: http://www.yogajunkies.at/festivalThank oyu so much
Best
hannahFebruary 7, 2020 at 10:14 am #1158172LeoStaffCustomer SupportIf you add the PHP snippet here:
https://generatepress.com/forums/topic/gp-1-9-0-update/#post-1069229Adding PHP: https://docs.generatepress.com/article/adding-php/
Then you can use either disable header in the disable element metabox or layout element to hide the mobile header.
Let me know if this helps π
February 7, 2020 at 9:32 pm #1158533_blankHello, I added the snipped and then went on pages – deactivate element and clicked the header checkbox: https://prnt.sc/qz9itj
Unfortunately, there are still 2 menus on mobile so something is not working correctly…
moreover, I wanted to ask if once it will work, will it only apply to mobile and my festival pages?
thank you so so much for your help
Best
HannahFebruary 8, 2020 at 12:57 am #1158593_blankThis is what i would like to hide: http://prnt.sc/qzazmd
(the mobile main header menΓΌ and also the cart) but only on certain pages – the pages which present my festival
thank you so muchFebruary 8, 2020 at 9:42 am #1158983LeoStaffCustomer SupportAhh ok sorry if it’s only on mobile we would need to use CSS:
@media (max-width: 768px) { body.page-id-29506 #mobile-header { display: none !important; } }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps π
February 11, 2020 at 1:46 am #1161484_blankHi Leo,
thank you so much! It works great for the homepage of the festival!
I tried to apply the same code with the according ID to all its subpages but unfortunately this did not work.
My coding now looks like this:
@media (max-width: 768px) {
body.page-id-29506 #mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29644#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29948#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29913#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29509#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29646#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29576#mobile-header {
display: none !important;
}
}
@media (max-width: 768px) {
body.page-id-29866#mobile-header {
display: none !important;
}
}Is there maybe another option to apply it? Such as the mobile header will not be displayed on mobile for pages with the author Tyler W? ( This is a little trick I used somewhere else…)
thank you so so much
Best
HannahFebruary 11, 2020 at 4:39 am #1161628DavidStaffCustomer SupportHi there,
you’re missing a space in your CSS selectors eg. this:
body.page-id-29644#mobile-header
should be:
body.page-id-29644 #mobile-header
Alternative methods such as using a class specific to say an author is not easily done with pages as they don’t tag pages like posts do.
Alternative:
1. Create a new Hook Element.
https://docs.generatepress.com/article/hooks-element-overview/2. Add this to the content:
<script> @media (max-width: 768px) { #mobile-header { display: none !important; } } </script>
3. Select the
WP_Head
hook4. Set you Display Rules to include those pages you want the Mobile header removed from
February 15, 2020 at 1:12 am #1165925_blankYaaay thank you SO much!! π
February 15, 2020 at 5:19 am #1166066DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.