added full width template to interior page.php
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 8 Sep 2016 14:38:55 +0000 (10:38 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 8 Sep 2016 14:38:55 +0000 (10:38 -0400)
functions.php
sections/interior-page.php

index ddf5979..8b7b8c5 100644 (file)
@@ -205,7 +205,8 @@ add_filter( 'custom_page_templates', function( $now_templates ) {
     // Below are some commented examples of custom quasi-templates.
     $templates = array(
        'partners-blocks' => 'Partners Page Blocks',
-       'members-only'    => 'Members Only'
+       'members-only'    => 'Members Only',
+       'full-width'       => 'Full Width'
     //    'any-template-slug' => 'Sample Template' ,
     );
 
index 2173b42..e5091f3 100644 (file)
@@ -1,8 +1,8 @@
 <main class="page-inside">
     <?php if (get_page_template_slug( $post->ID ) == "partners-blocks") { ?>
-    <div id="content-wrapper" class="partners-page-wrapper">
+        <div id="content-wrapper" class="partners-page-wrapper">
     <?php } else { ?>
-    <div id="content-wrapper">
+        <div id="content-wrapper">
     <?php } ?>
         <div class="row">
             <?php if(function_exists('bcn_display') && !is_front_page())
             }
             ?>
         </div>
-
+        <?php $post_content = get_post($post->ID); ?>
         <div class="row">
             <!-- check for partners page template -->
             <?php if (get_page_template_slug( $post->ID ) == "partners-blocks") { ?>
-            <?php $index_template = false; ?>
-               <?php $post_content = get_post($post->ID); ?>
-
-
-                   <?php echo apply_filters('the_content', $post_content->post_content) ; ?>
-                   <?php get_template_part('parts/glm-blocks'); ?>
-            <?php } ?>
-
-            <!-- check for members only template -->
-            <?php if (get_page_template_slug( $post->ID ) == "members-only") { ?>
-            <?php $index_template = false; ?>
-            <?php $post_content = get_post($post->ID); ?>
-                  <div class="medium-4 columns members-only-menu show-for-large">
-                     <?php //print_r(get_option('pr_options')); ?>
-                     <?php glm_side_menu(); ?>
-                 </div>
-                 <div class="small-12 medium-8 columns">
+                   
+                    <?php $index_template = false; ?>
                     <?php echo apply_filters('the_content', $post_content->post_content) ; ?>
-                 </div>
-          <?php } ?>
-
-        </div>
-          <div class="row">
-            <?php if(!is_front_page()) {
-                echo "<div class=\"small-12 medium-7 columns\">";
-                get_template_part('parts/main-content');
-                echo "</div>";
-                echo "<div class=\"small-12 medium-5 columns\">";
-                get_sidebar();
-                echo "</div>";
-            }
-            ?>
+                    <?php get_template_part('parts/glm-blocks'); ?>
+                   
+            <!-- check for members only template -->
+            <?php } else if (get_page_template_slug( $post->ID ) == "members-only") { ?>
+    
+                    <?php $index_template = false; ?>
+                          <div class="medium-4 columns members-only-menu show-for-large">
+                             <?php glm_side_menu(); ?>
+                         </div>
+                         <div class="small-12 medium-8 columns">
+                            <?php echo apply_filters('the_content', $post_content->post_content) ; ?>
+                         </div>
+            <!-- check for full width template -->
+            <?php } else if (get_page_template_slug( $post->ID ) == "full-width") { ?>
+                    <div class="small-12 columns">
+                        <?php echo apply_filters('the_content', $post_content->post_content) ; ?>
+                    </div>
+            <?php } else { ?>
+                    <?php if(!is_front_page()) {
+                    echo "<div class=\"small-12 medium-7 columns\">";
+                    get_template_part('parts/main-content');
+                    echo "</div>";
+                    echo "<div class=\"small-12 medium-5 columns\">";
+                    get_sidebar();
+                    echo "</div>";
+                     } ?>
+        <?php } ?>
         </div>
     </div>
 </main>
\ No newline at end of file