[Resolved] GP Sections vs GenerateBlocks – Background

Home Forums Support [Resolved] GP Sections vs GenerateBlocks – Background

Home Forums Support GP Sections vs GenerateBlocks – Background

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1636517
    Oriol

    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!

    #1636630
    David
    Staff
    Customer Support

    Hi 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.

    #1636687
    Oriol

    Hello 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!

    #1636695
    David
    Staff
    Customer Support

    Some 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 🙂

    #1642494
    Oriol

    Hello 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!

    #1642742
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.