Site logo

Archived topic

Elementor Archives Overiding Page Width Setting

11 replies · Started by Antar on February 17, 2019

Viewing posts 1–12 of 12

Hello,

I'm having trouble controlling the page width for archive pages created with Elementor. A normal page shoud be fixed at 1200px but archive pages are going to full width.

Normal: https://prnt.sc/mme8db
Archive: http://prntscr.com/mme83z

I've checked the CSS and can see a new ".full-width-content" class added to the body tag of the archive pages: http://prntscr.com/mme93p

This is taking precendence over the normal ".grid-container" class.

I've tried to take control by using a page layout element - but nothing seems to work.

Any ideas?

Thanks,

Antar

Leo -

You misunderstand. I DON'T want full-width. I want the content width to remain the same (1200px) as on all other pages.

Antar

I think you misunderstood.

Do you have a layout element created that's making the blog/archive page full-width?

That should be the only reason those pages have full-width container applied to them.

Hi, Leo -

No the Elementor layout is not full-width. Please see the screenshot: http://prntscr.com/mmf07u

You can also see that the content width is wider than the rest of the page.

Antar

Do you have another layout element that's setting the container width for other pages?

We know the options work for sure. Just need to find what's applying the full width options for those pages.

Make sure your caching plugin is cleared as well.

Hi, Leo -

I've done some more tests and can confirm this is a bug in Elementor. There is another post about it on this forum, here: Custom post templates in elementor show full width in boxed mode

Elementor is injecting the class full-width-content into the body tag automatically - even if the layout is set to "contained".

We need a work-around.

Antar

Just to note ... I see this issue is still relevant (Elementor single post templete layout set to "contained" does not adhere to setting; shows as full-width) ... although adding this code to my functions.php file in my child theme solved the issue.

Hopefully you can convince the Elementor team to fix the bug!

Apologies for resurrecting an old thread but I came across this exact issue today (in 2022), basically the Elementor Archive and Single page templates are adding a "full-width" class to the container element which is overriding the Generatepress layout settings, so it still hasn't been fixed on the Elementor side, the snippet in the github link that David posted above resolves the issue

This archived topic is closed to new replies.