[Resolved] Single Post width when you use GP with Elementor

Home Forums Support [Resolved] Single Post width when you use GP with Elementor

Home Forums Support Single Post width when you use GP with Elementor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1658732
    Erika

    When you use an Elementor template to single posts together with GeneratePress, you might encounter the problem that the width of the single post template gets set to full width.

    Why? GeneratePress has a global max-width value set to “auto.” embedded into the theme files. This value is overwritten when you set a container size from the Customize -> Layout. The new value is added to the theme elements via inline-style to the page index. When a template from Elementor is applied, the new value has no container to be added to.

    The solutions is (at the moment) to add the code
    selector #page {
    max-width: 1400px; [or whatever the site-width]
    }

    Add this code in Elementor -> Template -> Select and Open Single Post Template -> Settings of the Template -> Advanced -> Own CSS

    In this case this CSS is added to the single post template and gets loaded only when a single post ist loaded.

    I hope it helps others, too.

    #1659134
    David
    Staff
    Customer Support

    Hi there,

    thanks for sharing your fix.
    This problem occurs because of a ‘fix’ that Elementor introduced many years ago …. you can see an issue related to that ‘fix’ was raised on GitHub here:

    https://github.com/elementor/elementor/issues/5636

    Maybe Elementor want to revisit that issue …

    #1659882
    Erika

    Thanks, David, I am sharing it ๐Ÿ™‚

    #1660084
    David
    Staff
    Customer Support

    You’re welcome – and thank you again for sharing your workaround ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.