[Resolved] Global container – PageLayout

Home Forums Support [Resolved] Global container – PageLayout

Home Forums Support Global container – PageLayout

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1614967
    cpalo

    Good evening
    When we make the default choice container / one content (and not separate containers).
    Does the theme automatically insert a global container that will encompass everything that will be inserted with generateblocks.
    Or should we preferably when creating a page choose containers for what we will determine to be different sections ..

    #1614979
    Ying
    Staff
    Customer Support

    Hi there,

    I’m afraid it’s not what you thought it was 🙂

    Here’s a video to help you understand the differences between one container and separate containers options.

    You can set a global container width at Customizing > Layout >Container > Container width for your whole site.

    When you creating a GB container, choose “Contained width” for the Container, then the Container will respect the global container width you set in customizer.

    Let me know if there’s anything unclear.

    #1615511
    cpalo

    No no I understood the difference.
    But I wanted to know if choosing a global container causes GB to automatically insert an html tag just after the body to create this global container?

    #1615521
    cpalo

    Thanks for the video… it’s very good

    #1615560
    David
    Staff
    Customer Support

    Hi there,

    no setting the container does not wrap the content after the Body tag.
    All of the content you add to the Editor is output to the: inside-article container with the #page element.

    Do you want to add around all of the sites content? IF so try adding this PHP snippet:

    add_action('wp_body_open', function() {
    	?>
    	<div class="body-wrapper">
    	<?php
    });
    add_action('generate_after_footer', function() {
    	?>
    	</div>
    	<?php
    });

    It will open the <div> immediately after the opening <body> element, and close it after the footer

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1615561
    David
    Staff
    Customer Support

    Hi there,

    no setting the container does not wrap the content after the Body tag.
    All of the content you add to the Editor is output to the: inside-article container with the #page element.

    Do you want to add around all of the sites content? IF so try adding this PHP snippet:

    add_action('wp_body_open', function() {
    	?>
    	<div class="body-wrapper">
    	<?php
    });
    add_action('generate_after_footer', function() {
    	?>
    	</div>
    	<?php
    });

    It will open the <div> immediately after the opening <body> element, and close it after the footer

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1615851
    cpalo

    Between one container and separate containers options, I wanted to know which Html Tags GB inserted according to the chosen option.
    And if I understood correctly, in both cases this tag is inserted after inside-article.

    #1615938
    David
    Staff
    Customer Support

    All content is inserted within the inside-container whether use One or Separate Containers.
    Neither option will affect the post content.

    Those options simply change the design styles of the theme elements.

    One Container the customizer Spacing and Background colors is applied to #content div.
    Separate Containers those styles are moved to the inner container of each element eg. Posts content, Sidebar Widgets.

    #1615964
    cpalo

    OK. Thanks

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