- This topic has 11 replies, 1 voice, and was last updated 1 year, 8 months ago by niall.
-
AuthorPosts
-
February 17, 2019 at 1:25 pm #813043Antar
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/mme83zI’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
February 17, 2019 at 1:56 pm #813054LeoStaffCustomer SupportHi there,
Metabox doesn’t work on blog/archive pages by WordPress default.
The only way to apply full-width container to blog/archive pages is to use Layout Element:
https://docs.generatepress.com/article/layout-element-overview/#containerCan you check if that’s the case for you?
February 17, 2019 at 1:58 pm #813055AntarLeo –
You misunderstand. I DON’T want full-width. I want the content width to remain the same (1200px) as on all other pages.
Antar
February 17, 2019 at 2:01 pm #813057LeoStaffCustomer SupportI 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.
February 17, 2019 at 2:26 pm #813062AntarHi, 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
February 17, 2019 at 3:20 pm #813100LeoStaffCustomer SupportI’m not talking about Elementor.
Do you have a layout element created that’s making the blog/archive page full-width?
https://docs.generatepress.com/article/layout-element-overview/#container
February 17, 2019 at 3:26 pm #813102Antar`Hi, Leo –
No. I have created an element in an attempt to control the content width:
http://prntscr.com/mmfknl
http://prntscr.com/mmfkeiThis is set to the “contained” option.
Antar
February 17, 2019 at 3:46 pm #813105LeoStaffCustomer SupportDo 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.
February 18, 2019 at 12:02 am #813253AntarHi, 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
February 18, 2019 at 4:30 am #813400DavidStaffCustomer SupportThis came up on Elementor GitHub – the snippet actually works but it would be better to get behind the issue with Elementor and have them resolve it at source:
https://github.com/elementor/elementor/issues/5636#issuecomment-464561021
May 5, 2019 at 4:53 am #889482DeanJust 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!
August 26, 2022 at 9:53 am #2324858niallApologies 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
-
AuthorPosts
- You must be logged in to reply to this topic.