[Support request] Contained Size always Full Width

Home Forums Support Contained Size always Full Width

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1321940
    Rob Eccles

    Hi there.

    Ill try my best to explain this.

    My website using GP Premium is set to use a Contained wrapper – not full width. With a width of 1280px.

    I am using Elementor Pro also to create the pages.

    My issue is that, if I set my Elementor row to be “stretched”. It surely should be the Full width of its parent container. It seems to be ignoring GP’s container width and just making itself the full width of the screen?

    https://ibb.co/q7x1h9c

    #1321950
    David
    Staff
    Customer Support

    Hi there,

    Don’t use the Elementor stretch option – its doing exactly what it was designed to do which is to ignore the page container.

    #1322293
    Rob Eccles

    Hi David

    That’s fair enough.

    OK, so I have come to create a Single Post Template using Ele.

    http://staging.avidrambler.co.uk/walking-routes/the-beamers-trail/

    The page header is NOT set as Full Width or stretched. And yet its full width and as a background of white even though I didnt set that.

    I have gone into Appearence > Elements and Set all Single Posts under my CPT of Walking Routes. And tried changing those to Contained and specifying the width. And it is just ignoring my settings.

    I have noticed that its adding the class “full-width-content” to my body class too. Remove that using inspector and it behaves like it should.

    Im guessing its Elementor not GP causing this, but do you know a workaround posssibly as I dont expect a reply from Elementor support within this century.

    #1322298
    Rob Eccles

    As i click submit I remember a github snippet from a while ago.

    /**
    * Elementor seems to want to add ‘full-width-content’ body classes when create Templates
    * for things like single Pages, Posts, and Archives. Seems like GeneratePress sees that body
    * class and completely ignores if you have the template set to “Default Template” instead
    * of Canvas or Full Width. This fixes it.
    */

    if ( ! function_exists(‘mx_plugin_elementor’))
    {
    function mx_plugin_elementor($classes)
    {
    // See if this is anything but an empty string (default template)
    if (empty(get_page_template_slug()))
    {
    // I guess we should see if GP has this set to fullwidth content too
    if (empty(get_post_meta(get_the_ID(), ‘_generate-full-width-content’, true)))
    {
    // No fullwidth settings anywhere? Remove the fullwidth body class.
    foreach ($classes as $key => $value)
    {
    if ($value == ‘full-width-content’)
    {
    unset($classes[$key]);
    }
    }
    }
    }
    // Gimme back my classes
    return $classes;
    }
    add_filter(‘body_class’, ‘mx_plugin_elementor’, 12);
    }

    This seems to sort it.

    Obviously not been fixed in the months I found this. I assume Elementor just thinks everyone wants a Full Width website!!

    #1322352
    David
    Staff
    Customer Support

    Aah – yes Elementor and its full width settings….
    Glad to hear you found a solution.

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