adding full width page template for events or any other page that needs full width
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 21 Sep 2016 19:34:17 +0000 (15:34 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 21 Sep 2016 19:34:17 +0000 (15:34 -0400)
functions.php
sections/interior-page.php

index 5d0d3f6..4b69bd3 100644 (file)
@@ -211,7 +211,8 @@ add_filter( 'custom_page_templates', function( $now_templates ) {
     // this template by its slug in our index.php using get_page_template_slug
     // Below are some commented examples of custom quasi-templates.
     $templates = array(
-       'page-chamber'       => 'Chamber Page'
+       'page-chamber'       => 'Chamber Page',
+        'full-width'        => 'Full Width'
     //    'any-template-slug' => 'Sample Template' ,
     );
 
index 6340255..9642400 100644 (file)
                                 echo "</div>";
                             } ?>
                             <?php get_template_part('parts/main-content'); ?>
-                        </div>    
-                        <div id="sidebar" class="small-12 medium-4 medium-pull-8 columns">
+                         </div>    
+                         <div id="sidebar" class="small-12 medium-4 medium-pull-8 columns">
                             <?php get_template_part('parts/chamber-sidebar-left'); ?>
-                        </div>    
+                         </div>    
                         
-                   
-            <!-- check for chamber page template -->
-            <?php } else { ?>
-                <?php if(!is_front_page()) {
-                    echo "<div class=\"small-12 medium-8 large-9 columns\">";
-                    if(function_exists('bcn_display') && !is_front_page()) 
-                    {
-                        echo "<div class=\"breadcrumbs\">";
-                        bcn_display();
+                <?php } else if(get_page_template_slug( $post->ID ) == "full-width") { ?>  
+                     <div id="full-width" class="small-12 columns">
+                            <?php echo do_shortcode("[glm-members-event-list]"); ?>
+                     </div>
+                <!-- check for chamber page template -->
+                <?php } else { ?>
+                    <?php if(!is_front_page()) {
+                        echo "<div class=\"small-12 medium-8 large-9 columns\">";
+                        if(function_exists('bcn_display') && !is_front_page()) 
+                        {
+                            echo "<div class=\"breadcrumbs\">";
+                            bcn_display();
+                            echo "</div>";
+                        }
+                        get_template_part('parts/main-content');
+                        echo "</div>";
+                        echo "<div id=\"sidebar\" class=\"small-12 medium-4 large-3 columns\">";
+                        get_sidebar();
                         echo "</div>";
-                    }
-                    get_template_part('parts/main-content');
-                    echo "</div>";
-                    echo "<div id=\"sidebar\" class=\"small-12 medium-4 large-3 columns\">";
-                    get_sidebar();
-                    echo "</div>";
-                } ?>
-              <?php } ?>
+                    } ?>
+                  <?php } ?>
         </div>
     </div>
 </main>
\ No newline at end of file