changing sidebars template to no sidebars
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 4 Aug 2017 15:55:12 +0000 (11:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 4 Aug 2017 15:55:12 +0000 (11:55 -0400)
giving all pages sidebars by default, if they don't want sidebars, the no sidebars template can
be assigned

no-sidebars.php [new file with mode: 0644]
sections/entity-interior.php
sidebars.php [deleted file]

diff --git a/no-sidebars.php b/no-sidebars.php
new file mode 100644 (file)
index 0000000..fc57ff5
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+/*
+Template Name: No Sidebars
+*/
+get_template_part('index');
+?>
\ No newline at end of file
index 86c053e..e92da0f 100644 (file)
@@ -6,7 +6,7 @@
           <div class="row column">
                 <?php if(!is_front_page()) {
          
-                    if($template === 'sidebars.php'){
+                    if($template !== 'no-sidebars.php'){
                         get_template_part('parts/left-sidebar');
                     }
                     if($sidebar){
@@ -26,7 +26,7 @@
                     get_template_part('parts/main-content');
                     echo "</div>";
 
-                    if($sidebar && $template === 'sidebars.php'){
+                    if($sidebar && $template !== 'no-sidebars.php'){
                         echo "<div id='sidebar' class='small-12 medium-4 large-3 show-for-large columns'>";
                             get_sidebar();
                         echo "</div>";
diff --git a/sidebars.php b/sidebars.php
deleted file mode 100644 (file)
index 2f1d1e3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-/*
-Template Name: Sidebars
-*/
-get_template_part('index');
-?>
\ No newline at end of file