Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14388

    Is there a way I can create a full width template page to select. I know I can do this using the dynamic template but I need a full width page template as a physical file so I can select it for use with a plugin I need to use.

    #83255

    Copy/Paste the code below into a php file (call it eg template-fullwidth.php) and save it into the angular main theme folder (where style.css, etc. is located). Afterwards you’ll be able to select the template by using the “Template” dropdown on the editor page.

    <?php
    /*
    Template Name: Fullwidth
    */

    global $avia_config;
    $post_id = avia_get_the_ID();
    get_header();
    if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); the_post(); }

    ?>

    <!-- ####### MAIN CONTAINER ####### -->
    <div class='container_wrap fullsize' id='main'>

    <div class='container'>

    <?php
    if(!post_password_required($post_id))
    {
    $template -> element_on_condition('heading', 0);
    }
    ?>

    <div class='content twelve units'>

    <?php

    if(!post_password_required($post_id))
    {
    $template -> display();
    }
    else
    {
    echo get_the_password_form();
    }

    ?>

    <!--end content-->
    </div>

    <?php
    wp_reset_query();

    if(!isset($avia_config['currently_viewing']))
    {
    $avia_config['currently_viewing'] = 'page';
    }

    ?>

    </div><!--end container-->

    </div>
    <!-- ####### END MAIN CONTAINER ####### -->

    <?php get_footer(); ?>

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Full Width Template’ is closed to new replies.