- This topic has 5 replies, 3 voices, and was last updated 7 years, 9 months ago by
Tom.
-
AuthorPosts
-
April 17, 2018 at 3:15 am #552518
Thomas
Hi there,
I’m trying to use the new Elementor Theme Builder option to create templates for my archive pages. The problem is the following: My standard setting in Generatepress is boxed layout (1100px), but I have a few places where I like to use the full width.
Usually I override it in the generatepress metabox inside the standard wp editor screen (layout->page builder container->full width), cause the setting inside the elementor editor (settings->general settings->page layout) doesn’t seem to work to overwrite the gp settings.So this works for stuff like pages pretty well. BUT: for the new archive templates I can’t access the gp layout settings. Thus elementor sticks to the standard setting, regardless of the setting in the elementor editor. Furthermore: If I activate the js stretch method, it seems to work in the elementor editor itself, but not when I actually open the page.
So, proposed fix: Inlcude the layout metabox also for the new elementor template system. Or find a fix for the elementor setting.
Thanks a lot!
PS: I’m using all the current versions of the plugins, and the pro versions of gp and elementor.
April 17, 2018 at 8:52 am #552851Tom
Lead DeveloperLead DeveloperHi there,
This function should help: https://gist.github.com/generatepress/b5d7d93599ec7ad515d27974daa3a22c
I’ve asked Elementor to include it in their GP compatibility file, so hopefully they’ll do that and the function won’t be necessary.
Let me know 🙂
April 18, 2018 at 1:54 am #553511Thomas
Cool, thanks, this works like a charm.
Great support!
Best wishesApril 18, 2018 at 8:13 am #553848Tom
Lead DeveloperLead DeveloperNo problem! 🙂
June 13, 2018 at 9:55 pm #599641Eric
I wanted this to apply to the single theme pages as well so I modified your code to include them as well. It works but I’m not a programmer and I’m guessing there’s a better way to add the elementor_location_exists single type other than repeating it like I have. Thoughts?
add_action( 'wp', function() { add_filter( 'body_class', function( $classes ) { if ( function_exists( 'elementor_location_exits' ) && ( elementor_location_exits( 'archive', true ) || elementor_location_exits( 'single', true ) )) { $classes[] = 'full-width-content'; } return $classes; } ); } );June 14, 2018 at 9:35 am #600161Tom
Lead DeveloperLead DeveloperNope, that’s perfect 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.