- This topic has 34 replies, 3 voices, and was last updated 3 years, 11 months ago by
Leo.
-
AuthorPosts
-
April 18, 2019 at 10:12 am #872817
Karel
Hello,
I have full-screen elements header for all posts on desktop, but I would like to disable that header for mobile devices and have only the H1 with meta-data.
IΒ΄m trying to figure out how to do it but still no success … I tried already
@media(max-width: 768px) {
.page-hero {display:none}
}but that disables even front page header which I want to keep.
Thank you for any advice π
GeneratePress 2.2.2GP Premium 1.7.8April 18, 2019 at 10:47 am #872841Leo
StaffCustomer SupportHi there,
Try this:
@media(max-width: 768px) { body.single #mobile-header { display:none !important; } }
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 11:14 am #872857Karel
Hi Leo,
Sorry, that did not work, no change.
April 18, 2019 at 12:19 pm #872898Leo
StaffCustomer SupportAhh that’s because you are using the mobile header.
Do you only want to hide it on home page?
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 12:47 pm #872917Karel
No, I want to hide header in every post, but keep it on home page.
April 18, 2019 at 1:21 pm #872944Leo
StaffCustomer SupportCan you try the edited CSS here?
https://generatepress.com/forums/topic/disable-header-on-mobile/#post-872841Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 18, 2019 at 11:28 pm #873196Karel
I tried the edited one, but it is hiding my logo and menu button ( not the featured picture).
I would like to keep menu button, logo and post title with metadata. I need to hide only the featured picture in the header ( except Main page ).
April 19, 2019 at 9:10 am #873639Tom
Lead DeveloperLead DeveloperYou could try this:
@media (max-width: 768px) { .single .page-hero { display:none } }
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 19, 2019 at 10:19 am #873688Leo
StaffCustomer SupportMake sure to choose merge on desktop only for that page hero as well:
https://docs.generatepress.com/article/header-element-overview/#merge-with-contentDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 21, 2019 at 12:41 pm #875115Karel
It seems like it works.
The header is hidden now but with him even Heading with metadata … is there any chance to show it without a featured image?
Or i have to make another Heading ?
Thank you for your help π
April 21, 2019 at 4:02 pm #875196Leo
StaffCustomer SupportHmm give this a shot:
@media (max-width: 768px) { .single .page-hero { background-image: none; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 22, 2019 at 9:12 am #875777Karel
well, no success with that so I will stick with …
@media (max-width: 768px) {
.single .page-hero {
display:none
}
}and I will make a new Heading.
Is there any way how to show metadata ( like {{post_author}} | {{post_date}} | {{post_terms.taxonomy}} ) under the new heading?
Probably with use of hook right?April 22, 2019 at 9:51 am #875804Leo
StaffCustomer SupportHmm how come the CSS here didn’t work?
https://generatepress.com/forums/topic/disable-header-on-mobile/#post-875196What was the issue? Can you apply it so I can see?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 22, 2019 at 12:10 pm #875915Karel
Sorry my mistake, the code is working but not as I need.
I would like to have full-screen header with a picture on the desktop , but for mobile devices, I would like to have only Heading and Meta-Classes ( {{post_author}} | {{post_date}} | {{post_terms.taxonomy}} ) under it.
For example:
Lovely day in London
By Charlie / 22.04.2019 / In the United KingdomSorry for any misunderstanding.
April 22, 2019 at 12:49 pm #875939Leo
StaffCustomer SupportI’m still a bit confused…
Isn’t the format you want the same as the page hero without the background image?
What exactly wasn’t working when this CSS is used?
https://generatepress.com/forums/topic/disable-header-on-mobile/#post-875196Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.