Archived topic
Hide Page Hero certain pages
6 replies · Started by Frank on July 14, 2018
Hi,
I would like to hide a certain page hero for tablet and mobile on all pages except for the woocommerce pages. Is there an easy way to do this? Could use css but not a nice work-around.
Would be sweet if this would be a feature in the new layout elements, to disable the page hero :).
Still doesnt fix this issue for mobile and tablet though, or mobile should also be integrated in Elements.
Any thoughts?
Cheers
Rob
Hi there,
CSS solution is needed for something specific for mobile and tablet.
Which page hero are you trying to hide?
I can provide the code :)
Hi Leo,
I want to hide my Main Chirstmas Header page hero on all pages.
I want to keep the page hero I made for the search widget on the shop pages which I merge with navigation.
I dont see an unique id for theses heroes though.
Lemme know :).
Just to make sure, you are trying to hide the page header that's on home page on all pages in mobile and tablet?
Hmm I thought the page hero should have an unique ID but I don't see it either. Will confirm with Tom.
In the mean time you can add a custom class to the page hero and just use CSS to hide it :)
Just confirmed with Tom that automatic ID for page hero is removed because the addition of custom CSS field.
In that case you can just add hide-on-mobile and hide-on-tablet classes to that page hero:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
Thank you Leo, that's exactly what I wanted!
Should have known Tom thought this through :D....
Cheers,
Rob
No problem :)