[Resolved] Conflict with new Elementor 'Archive' Pages

Home Forums Support [Resolved] Conflict with new Elementor 'Archive' Pages

Home Forums Support Conflict with new Elementor 'Archive' Pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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.

    #552851
    Tom
    Lead Developer
    Lead Developer

    Hi 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 πŸ™‚

    #553511
    Thomas

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

    #553848
    Tom
    Lead Developer
    Lead Developer
    #599641
    Eric

    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;
        } );
    } );
    
    #600161
    Tom
    Lead Developer
    Lead Developer

    Nope, that’s perfect πŸ™‚

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