- This topic has 11 replies, 4 voices, and was last updated 3 years, 7 months ago by
Fernando.
-
AuthorPosts
-
August 8, 2022 at 2:10 am #2306512
Ella
Hi,
I’m trying to fix the spacing issues on https://wordpress-623989-2736800.cloudwaysapps.com/ and I essentially need to add a Spacer on desktop, but not have it show on mobile (as the spacing is perfect on mobile without that extra space, so it needs it just on desktop)
Is there a way to do this on settings? I’ve tried clicking on the block but that doesn’t seem to work. Or is there code I can add to do this?
Thanks,
EllaAugust 8, 2022 at 4:23 am #2306607David
StaffCustomer SupportHi there,
select the Spacer Block in the editor, and go to Advanced > Additional CSS Class(es) and add:
hide-on-mobileMore info on the GP
hide-in-*classes here:https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes
August 8, 2022 at 4:38 am #2306622Ella
Amazing, thank you so much. This works perfectly!
Can I do something similar to hide a header image – across all types of devices? I was going to add one on for SEO purposes so that it shows up with the image I’ve selected for Google search – but I don’t actually want it to show on the page!
Thanks,
EllaAugust 8, 2022 at 4:42 am #2306626David
StaffCustomer SupportIf you want you can add all three hide-on-* classes – copy and paste this:
hide-on-desktop hide-on-tablet hide-on-mobileAugust 8, 2022 at 4:46 am #2306628Ella
I’m unable to select the featured image to be able to add that into the classes as it goes on the right hand side of the editor within the “Page”, so you can only add or remove the image, there isn’t any other options for it. Can I add similar code into the page which specifies it’s the featured image we want to remove on all devices? (If that makes sense?)
Thanks,
EllaAugust 8, 2022 at 4:59 am #2306639David
StaffCustomer SupportOk, yeah you can use some CSS to hide them… but quick question, do you have an SEO plugin where you specify the image to be used in Search Results ? eg. Use the Featured Image for SERPS
August 8, 2022 at 5:00 am #2306643Ella
Ooh great, thank you! I have Yoast but that only allows you to change it for social media – not google search 🙂
August 8, 2022 at 5:09 am #2306650David
StaffCustomer SupportOk, so by default Yoast will use the Image you select in the post / page editor Featured Image meta box for the Google search results.
And you can tell the Theme not to show it on the Front End by:1. Customizer > Layout > Blog –> Featured Images panel
2. Select the Posts tab, and uncheckDisplay featured images
3. Repeat #2 for the Pages tab if thats required.OR you can selectively disable the Featured Image on individual posts or pages using the Disable Element Meta Box in the post editor:
https://docs.generatepress.com/article/disable-elements-overview/
OR use a Layout Element if you want to do disable it for specific places eg. Posts of a specific category:
https://docs.generatepress.com/article/layout-element-overview/
Whatever method, as long as you set a Featured Image in the editor, you should see it in the Yoast rich snippet preview.
August 8, 2022 at 6:16 am #2306703Ella
Brilliant, thanks for this! Doing it the first way via Customizer, where do I find the pages please? As I can only see blog then posts, I can’t seem to see the pages?
The second way with Disable Elements only seems to show the ‘content title’ option for me, you see.
Thanks,
EllaAugust 8, 2022 at 6:26 am #2306710David
StaffCustomer SupportDo you not see this ?
https://www.screencast.com/t/cZlO4jeZO
The second way , first go to Appearance > GeneratePress and Activate the Disable Elements module.
August 29, 2022 at 12:00 am #2326789Luca
Hi David, I have the same problem: I need to hide an element on mobile and tablet, and I inserted CSS on Block. It works, but on mobile and tablet there is a annoying space instead of block. Is possible to hide the whole element and not only the block?
August 29, 2022 at 12:54 am #2326813Fernando Customer Support
Hi Luca,
To have a better understanding of the issue, may you start a new topic and provide the link to the site in question? Can you also point where we can see the Element?
You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
-
AuthorPosts
- You must be logged in to reply to this topic.