Include no-sidebar template
authorLaury GvR <laury@gaslightmedia.com>
Wed, 17 Apr 2019 17:32:09 +0000 (13:32 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 17 Apr 2019 17:32:09 +0000 (13:32 -0400)
no-sidebar-template.php [new file with mode: 0644]
parts/main-content.php
sections/interior-page.php

diff --git a/no-sidebar-template.php b/no-sidebar-template.php
new file mode 100644 (file)
index 0000000..651cea1
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+/*
+Template Name: No Sidebar
+*/
+get_template_part('index');
+?>
\ No newline at end of file
index 3336e27..411b8ef 100644 (file)
@@ -1,4 +1,4 @@
-        <?php if (is_front_page()) { ?>
+        <?php if (is_front_page() || is_page_template('no-sidebar-template.php')) { ?>
             <div id="main-content" class="small-12 small-centered columns">
         <?php } else if (!is_page_template('no-bottom-sections.php')) { ?>
             <div id="main-content" class="small-12 large-8 columns" data-equalizer-watch>
index 00f7d07..f14ea16 100644 (file)
                             <div class="row medium-uncollapse">
 
                                     <?php get_template_part('parts/main-content');?>
-
-                                <div class="sidebar-container show-for-large-up small-12 large-4 columns small-text-center medium-text-left">
-                                    <?php get_sidebar(); ?>
-                                </div>
+                                    
+                                <?php if (!is_page_template('no-sidebar-template.php')) {  ?>
+                                    <div class="sidebar-container show-for-large-up small-12 large-4 columns small-text-center medium-text-left">
+                                        <?php get_sidebar(); ?>
+                                    </div>
+                                <?php } ?>
                             </div>
 
                             <?php if (!is_page_template('no-bottom-sections.php')) { ?>