Site logo

Archived topic

Conflict with new Elementor 'Archive' Pages

5 replies · Started by Thomas on April 17, 2018

Viewing posts 1–6 of 6

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.

Cool, thanks, this works like a charm.
Great support!
Best wishes

No problem! :)

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;
    } );
} );

Nope, that's perfect :)

This archived topic is closed to new replies.