- This topic has 5 replies, 2 voices, and was last updated 3 years, 1 month ago by David.
-
AuthorPosts
-
January 28, 2021 at 12:37 am #1636517Oriol
Hello,
I’m new on GeneratePress, and I’m trying to build a corporate site from scratch. T’ve been reading that GenerateBlocks Plugin is intended to replace the GP Sections module, and I’ve been trying both of them.
Although I find GeenrateBlocks much more capable, in order to create grid style layouts, as it is done all in the context of a page, it uses the white background of all pages, instead of using tjhe site background, as it happens with sections.
I need to create a main page in which all the content should have the same background (header, services section, certifications sections, and so on), and with sections is very easy to give any section a custom transparent background.
If there any way to mimic the same behavior, or should I be using custom CSS?
Thank you so much!
January 28, 2021 at 2:37 am #1636630DavidStaffCustomer SupportHi there,
if i understand correctly, you would want to change the Page containers background to transparent so as the Body background displays through.
If so then you would need some CSS like so:
#page .inside-article { background-color: transparent; }
To make it page specific you can target an individual page using the page ID eg.:
.page-id-54 #page .inside-article { background-color: transparent; }
Or if all your pages are going to be constructed in the same way then you may be better of changing the Customizer > Colors > Content to Transparent. And then we can use CSS to change non pages ( eg. Blog and Archives ) to another color…. Let me know.
January 28, 2021 at 3:12 am #1636687OriolHello David,
Thanks for your response. I’ll be checking that.
I also saw that, if I add the same grid layout that provides GenerateBlocks, inside a GP Block Element (that support using Gutenberg blocks), instead of inside the Home Page’ body, it can keep a transparent background, so it seems to solve the problem as well.
Could this also be a correct way to address that? I mean, putting all section code I need for my Home Page inside individual GP Block Elements, so that I may also reuse some of them in other pages?
Thanks again!
January 28, 2021 at 3:17 am #1636695DavidStaffCustomer SupportSome Hooks, such as the after_header sit outside of the content which is why they have the body background. I personally would not use the Block Element to replace your entire page content. For starters if you’re using an SEO plugin on that page it won’t be able to easily parse that content.
I would use the CSS method 🙂
February 2, 2021 at 12:25 am #1642494OriolHello David,
Thanks so much for this recomendations. I’ve tried doing the way you told without any further problems, so I’ll be putting most of the content inside the page content.
Thank you!
February 2, 2021 at 4:31 am #1642742DavidStaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.