r/elementor • • 8d ago

Question Additional Page Layouts?

I am pretty versed in Elementor Pro, however there is one thing I have not been able to figure out ... Is it possible to add additional page layouts? After creating a "single page" layout I would like to create an alternate as well.

I tried searching but I could only find a post asking the same question with no replies ... Thanks in advance.

2 Upvotes

9 comments sorted by

•

u/AutoModerator 8d ago

Looking for Elementor plugin, theme, or web hosting recommendations?

Check out our Megathread of Recommendations for a curated list of options that work seamlessly with Elementor.


Hey there, /u/Juice-Surge-Deluxe! If your post has not already been flaired, please add one now. And please don't forget to write "Answered" under your post once your question/problem has been solved. Make sure to list if you're using Elementor Free (or) Pro and what theme you're using.

Reminder: If you have a problem or question, please make sure to post a link to your issue so users can help you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/Early-Community9943 8d ago

If you'd rather skip code, Pro's Theme Builder can do it: make a second Single Page template and set its display conditions to the specific pages or a category.

1

u/_miga_ 🏆 #1 Elementor Champion 8d ago

sure, but I'm not sure if that is the question here as the template code approach is using a file to render the pages, so you can use code to create your template and not Elementor. Otherwise of course your solution is the normal way to do it in Elementor but since OP says they are "pretty versed in Elementor Pro" this would be to obvious 😄

1

u/Juice-Surge-Deluxe 7d ago

Right. I am aware of how it to do it with conditions but I want a solution where I can select it from the drop down! Thanks guys !!

3

u/_miga_ 🏆 #1 Elementor Champion 8d ago • Mindblown

Did you ask any AI to check it for you or the place Elementor does it? It took a minute to add it. E.g. you can use

add_action( 'init', function () {
    foreach ( get_post_types_by_support( 'elementor' ) as $post_type ) {
        add_filter( "theme_{$post_type}_templates", function ( $templates ) {
            $templates['elementor-single-page.php'] = 'Elementor – Single Page';
            return $templates;
        }, 20 );
    }
}, 20 );

the Site settings - default site layout is a hard coded list but even there AI manages to create some code:

add_action( 'elementor/element/kit/section_settings-layout/before_section_end', function ( $kit ) {
    $kit->update_control( 'default_page_template', [
        'options' => [
            'elementor-single-page.php' => 'Elementor – Single Page',
        ],
    ], [ 'recursive' => true ] );
} );

You still have to add another add_filter( 'template_include', function ( $template ) {} block but you can spend some tokens on that yourself.

1

u/mossmoth9 6d ago

wild that the default site layout list is still hardcoded like that tbh

0

u/eunuskhan 7d ago

Those options come from two places. Canvas and Full Width are added by Elementor, and Default follows your theme and site settings. The dropdown also lists any page templates your theme registers, so extra layouts have to come from the theme side.

To add one, create a custom page template file in a child theme with a "Template Name" comment at the top. It will then show up in that dropdown.

If what you really want is an alternate design for certain pages, use Theme Builder instead. Make a second Single Page template and set its conditions to those pages.

One catch: pages set to Canvas, Full Width or any non-Default template won't get the Single Page template applied, so keep those pages on Default.