Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1209210

    Hello,

    I have created a page in Enfold and I would like to transform it into a template so that to use it as a template for other pages.
    Could you tell me how can I do it ?
    Thanks
    Lulu

    #1209391

    Hey Lulu,

    You can save the layout as a template in the top right hand corner of the Layout Builder window, or you can use the Page Content element to load your layout in more than one place. The Page Content element will update your content globally, but the template which you save and load in the top right hand corner will not update globally.

    Best regards,
    Rikard

    #1209439

    Hi Rikard,
    Thank you for your prompt response. Presently there are 3 templates in Enfold: Archive, Blank and default. What I would like to do is create a 4th one based on my page.
    I have tried saving my page as a template but it doesn’t really work for my purpose because the template doe not appear in the template options. Then if I use the page content element, it is just like an iframe, it’s not a template. Is there a way I could create a real template that would appear in the template options ?

    Kind regards

    Lulu

    #1211401

    Hi Lulu,

    You can try to copy this file /enfold/template-blank.php

    rename it to template-custom.php and make your changes in the new file.

    Best regards,
    Victoria

    #1211510

    hi Victoria,

    Thank you very much indeed.
    So, just to be sure : I just have to replace blank by custom in the template, like this:
    <?php
    /*
    Template Name: Custom – No Header, no Footer
    */

    if ( !defined(‘ABSPATH’) ){ die(); }

    /*
    * A custom Template that allows you to build landing pages, coming soon pages etc
    */

    global $avia_config;
    $avia_config[‘template’] = “avia-custom”; //important part. this var is checked in header and footer php and if set prevents them from rendering. also an additional class is applied to the body

    if(!empty($avia_config[‘conditionals’][‘is_builder’]))
    {
    $avia_config[‘conditionals’][‘is_builder_template’] = true;
    get_template_part(‘template-builder’);
    exit();
    }
    else
    {
    get_template_part(‘page’);
    exit();
    }

    Best

    Lulu

    #1211647

    Hi Victoria,
    Please disregard my previous question, it’s all ok.
    Thank’s again
    Lulu

    #1212562

    Hi,

    Awesome! Please let us know if you need anything else. We’ll close this thread for now.

    Thank you for using Enfold.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Creating custom page template’ is closed to new replies.