added the changes made for capstone
authorIan Weller <ian@gaslightmedia.com>
Wed, 7 Sep 2016 14:10:20 +0000 (10:10 -0400)
committerIan Weller <ian@gaslightmedia.com>
Wed, 7 Sep 2016 14:10:20 +0000 (10:10 -0400)
We found out the hard way that having everything in a single index file is
not as convinent as we thought.  Laury broke it down into managable
sections and I added them to the glmTheme.  Not much difference than the
way we had it before I think.

12 files changed:
root/index.php
root/sections/blog-archive.php [new file with mode: 0644]
root/sections/blog-home.php [new file with mode: 0644]
root/sections/blog-single.php [new file with mode: 0644]
root/sections/copyright.php [new file with mode: 0644]
root/sections/footer.php [new file with mode: 0644]
root/sections/front-page.php [new file with mode: 0644]
root/sections/header.php [new file with mode: 0644]
root/sections/interior-page.php [new file with mode: 0644]
root/sections/off-canvas.php [new file with mode: 0644]
root/sections/search.php [new file with mode: 0644]
root/sections/top-bar.php [new file with mode: 0644]

index 92fe074..fa877a9 100644 (file)
-<?php
-/*
- *  1. Body
- *  2. Header
- *  3. Top Bar
- *  4. Off Canvas
- *  5. Main
- *   5.1. Front Page
- *   5.2 Blog Home Page
- *   5.3 Blog Archive Page
- *   5.4 Blog Single Post
- *   5.5 Search Results
- *   5.6 Interior Page
- *  6. Footer
- *  7. Copyright
- */
-?>
-
-<?php
-/*
- * 1. Body
- * The first set up layer
- */
-?>
-
 <!doctype html>
 <html class="no-js" lang="en">
-    <?php
-    /*
-     * Site header meta information 
-     */
-    ?>
-<editor-fold defaultstate="collapsed">
-  <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title><?php wp_title(); ?></title>
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css">
-    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
-    <?php wp_head(); ?>
-  </head>
-</editor-fold>
-  <body>
-      <div class="off-canvas-wrapper">
-        <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
-            <div class="off-canvas-content" data-off-canvas-content>
-
-<?php
-/*
- * 2. Header
- * The first visible items. Top of the Page
- */
-?>
-<editor-fold defaultstate="collapsed">
-                    <header>
-                        <div class="row">
-                            
-                        </div>
-<!--
-                        <div class="search-top show-for-large-up">
-                            <?php //get_template_part('parts/search-form');?>
-                        </div>
--->
-                    </header>
-</editor-fold>
-<?php
-/*  
- * 2. /Header
- * End of the Header
- */
-?>
-<?php
-/*
- * 3. Off Canvas
- * Hidden Off Canvas Menu
- */
-?>
-<editor-fold defaultstate="collapsed">
-                    <div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="large">
-                        <div class="title-bar-left">
-                            <button class="menu-icon" type="button" data-open="offCanvasLeft"></button>
-                            <span class="title-bar-title">Menu</span>
-                        </div>
-                        <div class="title-bar-right">
-                            <button class="menu-icon" type="button" data-open="offCanvasRight"></button>
-                          </div>
-                    </div>
-                    <div class="off-canvas position-left" id="offCanvasLeft" data-off-canvas>
-                        <?php glm_theme_mobile_off_canvas(); ?>
-                        <?php get_template_part('parts/search-form');?>
-                        <?php if (function_exists('glm_get_clientinfo_option')) :?>
-                            <ul class="vertical">
-                                <li><?php echo glm_get_clientinfo_option('businessName');?></li>
-                                <?php if (glm_get_clientinfo_option('address')):?>
-                                    <li><?php echo glm_get_clientinfo_option('address');?></li>
-                                    <li><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
-                                        <?php echo glm_get_clientinfo_option('zip');?></li>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('address2')):?>
-                                    <li><?php echo glm_get_clientinfo_option('address2');?></li>
-                                    <li><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
-                                        <?php echo glm_get_clientinfo_option('zip2');?></li>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('phone')) :?>
-                                    <li><?php echo glm_get_clientinfo_option('phone');?></li>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('phone2')) :?>
-                                    <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('phone2');?></span>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('email')) :?>
-                                    <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('email');?></span>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('fax')) :?>
-                                    <li><?php echo glm_get_clientinfo_option('fax');?></li>
-                                <?php endif;?>
-                                <?php if (glm_get_clientinfo_option('extra')) :?>
-                                    <li><?php echo glm_get_clientinfo_option('extra');?></li>
-                                <?php endif;?>
-                            </ul>
-                            <?php endif;?>
-                    </div>
-                    
-<?php
-/*
- * 3. /Off Canvas 
- * End of Off Canvas Menu
- */
-?>
-</editor-fold>
-<?php
-/*
- * 4. Top Bar
- * The main navigation for the site. Bar Navigantion
- */
-?>
-<editor-fold defaultstate="collapsed">
-                    <div id="main-menu" class="top-bar">
-                        <div class="top-bar-left">
-                            
-                            <?php glm_theme_top_bar(); ?>
-                        </div>
-                        
-                    </div>
-</editor-fold>
-<?php
-/*
- * 4. /Top Bar
- * End of main navigation. End of Bar Navigation
- */
-?>
-
-<?php
-/*
- * 5. Main
- * Primary Content Area
- */
-?>
-<?php
-/*
- * 5.1. Front Page
- * Front Page Area
- */
-?>
-<editor-fold defaultstate="collapsed">
-<?php if (is_front_page()) { ?>
-                    <main class="page-front">
-                        <div class="row">
-                            <?php get_template_part('parts/slide-show');?>
-                        </div>
-                        <div id="content-wrapper">
-                            <div class="row" data-equalizer data-options="equalize_on_stack: false">
-                                <?php
-                                get_template_part('parts/glm-blocks');
-                                ?>
-                            </div>
-                            <div class="row">
-                                <?php get_template_part('parts/main-content');?>
-
-                                <div class="small-12 medium-6 large-4 columns small-text-center medium-text-left">
-                                    <?php //get_sidebar(); ?>
-                                </div>
-
-                            </div>
-                        </div>
-                    </main>
-<?php } ?>                        
-<?php
-/*
- * 5.1. /Front Page
- * End of Front Page Area
- */
-?>
-</editor-fold>                        
-<?php
-/*
- * 5.2 Blog Home Page
- * Home Page for Posts
- */
-?>
-<editor-fold defaultstate="collapsed">    
-<?php if (is_home()) { ?>
-                    <main class="blog-home">
-                <!--    <article <?php // post_class() ?> id="interior-featured">
-                        <?php // GLM_get_header(); ?>
-                    </article> -->
-                        <div class="row">
-                            <?php get_template_part('parts/blog-content-area'); ?>
-                            <?php get_template_part('parts/blog-sidebar-r'); ?>
-                        </div>
-                    </main>
-<?php } ?>                        
-<?php
-/*
- * 5.2 /Blog Home Page
- * End of Home Page for Posts
- */
-?>
-</editor-fold>
-<?php
-/*
- * 5.3 Blog Archive Page
- * Page for a selected set of Posts
- */
-?>
-<editor-fold defaultstate="collapsed">    
-<?php if (is_archive()) { ?>
-                    <main class="blog-archive">
-                        <div class="row">
-                            <?php get_template_part('parts/blog-content-area'); ?>
-                            <?php get_template_part('parts/blog-sidebar-r'); ?>
-                        </div>
-                    </main>
-<?php } ?>
-<?php
-/*
- * 5.3 /Blog Archive Page
- * Page for a selected set of Posts
- */
-?>
-</editor-fold>
-<?php
-/*
- * 5.4 Blog Single Post
- * Page for a Post
- */
-?>
-<editor-fold defaultstate="collapsed">
-<?php if (is_single()) { ?>
-                    <main class="blog-single">
-                        <div class="row">
-                            <div id="blog-posts-over" class="small-12 medium-9 columns">
-                                <?php if(have_posts()) : while(have_posts()): the_post();?>
-                                <div class="row blog-post-container">
-                                    <div class="small-11 small-centered columns">
-                                        <div class="row">
-                                            <div class="small-12 columns">
-                                                <?php get_template_part('parts/blog-text'); ?>
-                                                <?php if ( comments_open() || get_comments_number() ) :
-                                                comments_template();
-                                                endif; ?>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <?php endwhile; ?>
-                                <?php else: ?>
-                                <div id="post-404" class="noposts">
-                                    <p><?php _e('Sorry, no results were found.');?></p>
-                                </div><!-- /#post-404 -->
-                                <?php endif;?>
-                            </div>
-                            <?php get_template_part('parts/blog-sidebar-r'); ?>
-                        </div>
-                    </main>    
-<?php } ?>                        
-<?php
-/*
- * 5.4 /Blog Single Post
- * End of a Post
- */
-?>
-</editor-fold>
-<?php
-/*
- * 5.5 Search Result Page
- * Page for Search Results
- */
-?>
-<editor-fold defaultstate="collapsed">
-<?php if (is_search()) { ?>
-        <main class="search-results">
-            <div class="row">
-                <?php if (get_search_query() == "") { ?>
-                <br><h2 class="search-result-header small-12 columns">Please enter a query in the search box. </h2>
-                <?php } else { ?>
-                <br><h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
-            </div>
-
-            <div class="row">
-                <div id="blog-posts-over" class="small-12 columns">
-                    <?php if(have_posts()) : while(have_posts()): the_post();?>
-                        <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && ($post->post_type=='page')) continue; ?>
-                    <div class="row content search-result-container">
-                        <div class="small-11 small-centered columns">
-                            <article id="<?php the_ID()?>" <?php post_class()?>>
-                                <header class="entry-header">
-                                    <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
-                                    <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
-                                </header>
-
-
-                        <!-- Start of the Contextual/Highlight Search -->
-                                        <?php
-                                        // Configuration
-                                        $max_length = 400; // Max length in characters
-                                        $min_padding = 30; // Min length in characters of the context to place around found search terms
-
-                                        // Load content as plain text
-                                        global $wp_query, $post;
-                                        $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
-
-                                        // Search content for terms
-                                        $terms = $wp_query->query_vars['search_terms'];
-                                        if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
-                                            $padding = max($min_padding, $max_length / (2*count($matches[0])));
-
-                                          // Construct extract containing context for each term
-                                          $output = '';
-                                          $last_offset = 0;
-                                          foreach ( $matches[0] as $match ) {
-                                            list($string, $offset) = $match;
-                                            $start  = $offset-$padding;
-                                            $end = $offset+strlen($string)+$padding;
-                                            // Preserve whole words
-                                            while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--;
-                                            while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++;
-                                            $start = max($start, $last_offset);
-                                            $context = substr($content, $start, $end-$start);
-                                            if ( $start > $last_offset ) $context = '...'.$context;
-                                            $output .= $context;
-                                            $last_offset = $end;
-                                          }
-
-                                          if ( $last_offset != strlen($content)-1 ) $output .= '...';
-                                        } else {
-                                          $output = $content;
-                                        }
-
-                                        if ( strlen($output) > $max_length ) {
-                                          $end = $max_length-3;
-                                          while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--;
-                                          $output = substr($output, 0, $end) . '...';
-                                        }
-
-                                        // Highlight matches
-                                        $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
-                                        ?>
-
-                                        <p class="search_result_context">
-                                          <?php echo $context ?>
-                                        </p>
-                                        <p>
-                                          <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
-                                        </p>
-                        <!-- End of the Contextual/Highlight Search -->
-
-                                <?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
-                                <footer class="entry-meta small-12 medium-6 medium-push-3 center">
-                                    <?php
-                                    if (has_category()) {
-                                        $post_categories = wp_get_post_categories( get_the_ID() );
-                                        $cats = array();
-                                        echo 'This entry was posted ';
-                                        echo 'in';
-                                        foreach($post_categories as $c){
-                                            $cat = get_category( $c );
-                                            $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
-                                            echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
-                                        }
-                                        echo '.';
-                                    }
-                                    ?>
-                                </footer>
-                            </article>
-                        </div>
-                    </div>
-                    <?php endwhile; ?>
-                    <div class="navigation">
-                        <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
-                    </div><!-- /.navigation -->
-                    <?php else: ?>
-                    <div id="post-404" class="noposts">
-                        <p><?php _e('Sorry, no results were found.');?></p>
-                    </div><!-- /#post-404 -->
-                    <?php endif;?>
-                </div>
-
-                    <?php } ?> <!-- end empty query check -->
-                </div>
-        </main>
-<?php } ?>                  
-<?php
-/*
- * 5.5 /Search Result Page
- * End of Search Results
- */
-?>
-</editor-fold>
-<?php
-/*
- * 5.6 Interior Page
- * Interior content Pages
- */
-?>
-<editor-fold defaultstate="collapsed">
-<?php if (is_page()) { ?>
-                    <main class="page-inside">
-                        <div id="content-wrapper">
-                            <div class="row">
-                                <?php if(function_exists('bcn_display') && !is_front_page())
-                                {
-                                    echo "<div class=\"breadcrumbs\">";
-                                    bcn_display();
-                                    echo "</div>";
-                                }
-                                ?>
-                            </div>
-                            <div class="row">
-                                <?php get_template_part('parts/main-content');?>
-                <!--
-                                <div class="small-12 medium-6 large-4 columns small-text-center medium-text-left">
-                                    <?php //get_sidebar(); ?>
-                                </div>
-                -->
-                            </div>
-                        </div>
-                    </main>    
-<?php } ?>    
-<?php
-/*
- * 5.6 /Interior Page
- * End of Interior Pages
- */
-?>
-</editor-fold>
-                    
-<?php
-/*
- * 5. /Main
- * End of Primary Content Area
- */
-?>
-<?php
-/*
- * 6. Footer
- * Footer Area, Bottom of the page.
- */
-?>
-<editor-fold defaultstate="collapsed">
-                        <footer class="main">
-                            <?php if (is_active_sidebar('sidebar-f')) :?>
-                                <?php dynamic_sidebar('sidebar-f');?>
-                            <?php endif;?>
-                            <div class="row">
-                                <div id="footer_address" class="row small-centered small-11 medium-6 columns">
-                                    <?php if (function_exists('glm_get_clientinfo_option')) :?>
-                                    <h2><?php echo glm_get_clientinfo_option('businessName');?></h2>
-                                    <?php if (glm_get_clientinfo_option('address')):?>
-                                        <span><?php echo glm_get_clientinfo_option('address');?></span>
-                                        <span class="bullet"> &#8226; </span>
-                                        <span><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
-                                            <?php echo glm_get_clientinfo_option('zip');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('address2')):?>
-                                        <span class="bullet"> &#8226; </span>
-                                        <span><?php echo glm_get_clientinfo_option('address2');?></span>
-                                        <span class="bullet"> &#8226; </span>
-                                        <span><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
-                                            <?php echo glm_get_clientinfo_option('zip2');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('phone')) :?>
-                                        <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('phone');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('phone2')) :?>
-                                        <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('phone2');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('email')) :?>
-                                        <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('email');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('fax')) :?>
-                                        <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('fax');?></span>
-                                    <?php endif;?>
-                                    <?php if (glm_get_clientinfo_option('extra')) :?>
-                                        <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('extra');?></span>
-                                    <?php endif;?>
-                                    <?php endif;?>
-                                </div>
-                            </div>
-                        </footer>
-<?php
-//  6. /Footer
-//  End of Footer Area, Bottom of the page.
-?>
-</editor-fold>
-<?php
-/*
- * 7. Copyright
- * Copyright Area
- */
-?>
-<editor-fold defaultstate="collapsed">                
-                <div id="copyright" class="small-12 text-center row columns">
-                    <span>Copyright &copy; <?php echo date('Y');?> </span>
-                    <span class="bullet"> &#8226; </span>
-                    <span> All Rights Reserved.</span>
-                    <span class="bullet"> &#8226; </span>
-                    <span> Produced by <a target="_blank" href="http://www.gaslightmedia.com">Gaslight Media</a></span>
-                </div>
-<?php
-/*
- * 7. /Copyright
- * End of Copyright Area
- */
-?>
-</editor-fold>
-                
-            <div class="js-off-canvas-exit"></div>
-            </div><!--/.off-canvas-content-->     
-        </div><!--End of inner-wrap-->
-      </div><!--End of off-canvas-->
-  <?php wp_footer();?>
-    <?php
-    /*
-     * 8. Footer Scripts
-     * Scripts manually loaded in the footer.
-     */
-
-    ?>
-<editor-fold defaultstate="collapsed">
-<script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>
-<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
-<script charset="utf-8" type="text/javascript">stLight.options({"publisher":"wp.c3d3647e-de70-4780-b71d-6b739fad685a"});var st_type="wordpress4.3.1";</script>
-<?php
-/*
- * 8. /Footer Scripts
- * End of Footer Scripts.
- */
-?>
-</editor-fold>
-  </body>
-</html>
-<?php
-/*
- * 1. /Body
- * End of Site
- */
-?>
\ No newline at end of file
+    <?php get_template_part("parts/header-meta"); ?>
+    <?php $index_template = true;?>
+    <body>
+        <div class="off-canvas-wrapper">
+            <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
+                <div class="off-canvas-content" data-off-canvas-content>
+                    <?php
+                    include "sections/header.php"; 
+                    include "sections/off-canvas.php"; 
+                    include "sections/top-bar.php"; 
+                    if (is_front_page()) { 
+                        include "sections/front-page.php"; 
+                    } 
+                    if (is_home()) { 
+                        include "sections/blog-home.php";
+                    } 
+                    if (is_archive()) { 
+                        include "sections/blog-archive.php";
+                    } 
+                    if (is_single()) {
+                        include "sections/blog-single.php";
+                    }
+                    if (is_search()) { 
+                        include "sections/search.php";
+                    }
+                    if (is_page() && !is_front_page()) { 
+                        include "sections/interior-page.php"; 
+                    }
+                    include "sections/footer.php";  
+                    include "sections/copyright.php";  
+                    ?>
+                    <div class="js-off-canvas-exit"></div>
+                </div><!--/.off-canvas-content-->
+            </div><!--End of inner-wrap-->
+        </div><!--End of off-canvas-->
+        <?php wp_footer();?>
+    </body>
+</html>
\ No newline at end of file
diff --git a/root/sections/blog-archive.php b/root/sections/blog-archive.php
new file mode 100644 (file)
index 0000000..1d3b1f8
--- /dev/null
@@ -0,0 +1,8 @@
+<main class="blog-archive">
+   <div class="row">
+      <?php get_template_part('parts/blog-sidebar-r'); ?>
+   </div>
+    <div class="row">
+        <?php get_template_part('parts/blog-content-area'); ?>
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/blog-home.php b/root/sections/blog-home.php
new file mode 100644 (file)
index 0000000..90a0b4f
--- /dev/null
@@ -0,0 +1,8 @@
+<main class="blog-home">
+   <div class="row">
+       <?php get_template_part('parts/blog-sidebar-r'); ?>
+   </div>
+    <div class="row">
+        <?php get_template_part('parts/blog-content-area'); ?>
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/blog-single.php b/root/sections/blog-single.php
new file mode 100644 (file)
index 0000000..a7197c4
--- /dev/null
@@ -0,0 +1,26 @@
+<main class="blog-single">
+    <div class="row">
+        <div id="blog-posts-over" class="small-12 medium-9 columns">
+            <?php if(have_posts()) : while(have_posts()): the_post();?>
+            <div class="row blog-post-container">
+                <div class="small-11 small-centered columns">
+                    <div class="row">
+                        <div class="small-12 columns">
+                            <?php get_template_part('parts/blog-text'); ?>
+                            <?php if ( comments_open() || get_comments_number() ) :
+                            comments_template();
+                            endif; ?>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <?php endwhile; ?>
+            <?php else: ?>
+            <div id="post-404" class="noposts">
+                <p><?php _e('Sorry, no results were found.');?></p>
+            </div><!-- /#post-404 -->
+            <?php endif;?>
+        </div>
+        <?php get_template_part('parts/blog-sidebar-r'); ?>
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/copyright.php b/root/sections/copyright.php
new file mode 100644 (file)
index 0000000..b22d93c
--- /dev/null
@@ -0,0 +1,11 @@
+<div id="bottom">
+    <div id="copyright" class="small-12 text-center row columns">
+        <span>Copyright &copy; <?php echo date('Y');?> </span>
+        <span class="bullet"> &#8226; </span>
+        <span> Produced by <a target="_blank" href="http://www.gaslightmedia.com">Gaslight Media</a></span>
+        <span class="bullet"> &#8226; </span>
+        <span> All Rights Reserved.</span>
+        <span class="bullet"> &#8226; </span>
+        <span><a id="part-login" href="<?php bloginfo('url')?>/wp-admin">Partner Login</a></span>
+    </div>
+</div>
\ No newline at end of file
diff --git a/root/sections/footer.php b/root/sections/footer.php
new file mode 100644 (file)
index 0000000..b7b805c
--- /dev/null
@@ -0,0 +1,72 @@
+ <footer class="main">
+    <div class="book-bar">
+        <div class="row medium-uncollapse large-collapse">
+            <div class="small-centered small-12 medium-10 columns">
+                <div class="row collapse">
+                    <div class="small-12 large-5 columns text-center large-text-right">
+                        <img src="<?php bloginfo('template_url');?>/assets/capstone-book.png">
+                    </div>
+                    <div class="small-12 large-7 columns text-center large-text-left">
+                        <h1>Our Book</h1>
+                        <h4>The Employee Experience.<br>A Capstone Guide to Peak Performance</h4>
+                        <a href="#" class="button">order now</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <?php if (is_active_sidebar('sidebar-f')) :?>
+        <?php dynamic_sidebar('sidebar-f');?>
+    <?php endif;?>
+    <div id="reference" class="row">
+        <div id="news" class="small-12 small-push-0 medium-push-8 medium-4 columns text-center medium-text-left">
+            <h2>Just Start Newsletter</h2>
+            <p>Monthly Healthcare Best Practices</p>
+            <a href="#" class="button">sign up</a>
+        </div>
+        <div id="footer_address" class="medium-4 columns show-for-medium">
+            <?php if (function_exists('glm_get_clientinfo_option')) :?>
+<!--                                    <h2><?php //echo glm_get_clientinfo_option('businessName');?></h2>-->
+            <?php if (glm_get_clientinfo_option('address')):?>
+                <span><?php echo glm_get_clientinfo_option('address');?></span>
+                <br>
+                <span><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
+                    <?php echo glm_get_clientinfo_option('zip');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('address2')):?>
+                <span class="bullet"> &#8226; </span>
+                <span><?php echo glm_get_clientinfo_option('address2');?></span>
+                <span class="bullet"> &#8226; </span>
+                <span><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
+                    <?php echo glm_get_clientinfo_option('zip2');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('phone')) :?>
+                <br><span><?php echo glm_get_clientinfo_option('phone');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('phone2')) :?>
+                <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('phone2');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('email')) :?>
+                <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('email');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('fax')) :?>
+                <span> &#124; <?php echo glm_get_clientinfo_option('fax');?></span>
+            <?php endif;?>
+            <?php if (glm_get_clientinfo_option('extra')) :?>
+                <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('extra');?></span>
+            <?php endif;?>
+            <?php endif;?>
+            <ul class="social">
+                <li class="facebook"><a href="#" target="_blank"></a></li>
+                <li class="twitter"><a href="#" target="_blank"></a></li>
+                <li class="linkin"><a href="#" target="_blank"></a></li>
+                <li class="youtube"><a href="#" target="_blank"></a></li>
+                <li class="insta"><a href="#" target="_blank"></a></li>
+                <li class="google"><a href="#" target="_blank"></a></li>
+            </ul>
+        </div>
+        <div class="small-12  small-pull-0 medium-pull-8 medium-4 columns text-center medium-text-left">
+            <img src="<?php bloginfo('template_url');?>/assets/capstone-leadership-footer-logo.png">
+        </div>
+    </div>
+</footer>
\ No newline at end of file
diff --git a/root/sections/front-page.php b/root/sections/front-page.php
new file mode 100644 (file)
index 0000000..e0e927c
--- /dev/null
@@ -0,0 +1,112 @@
+<main class="page-front">
+    <div class="slide-bar-row">
+        <div id="slide">
+            <?php get_template_part('parts/slide-show');?>
+        </div>
+        <div id="bar" class="small-centered large-uncentered">
+            <div class="accordion">
+                <section id="training" class="accordion-item">
+                    <a href="#">Training</a>
+                    <div class="accordion-item-content">
+                        <p class="text-center">Let’s work together! Every team should have the <b>best</b> leaders equipped with the <b>best</b> solutions.</p>
+                    </div>
+                </section>
+                <section class="accordion-item">
+                    <a href="#">Partnering</a>
+                    <div class="accordion-item-content">
+                        <p class="text-center">Let’s work together! Your journey is our passion.</p>
+                    </div>
+                </section>
+                <section class="accordion-item">
+                    <a href="#">Speaking</a>
+                    <div class="accordion-item-content">
+                        <p class="text-center">Let’s work together! To inspire positive change.</p>
+                    </div>
+                </section>
+                <section id="planning" class="accordion-item">
+                    <a href="#">Planning</a>
+                    <div class="accordion-item-content">
+                        <p class="text-center">Let’s work together! Your <b>great</b> vision deserves a <b>great</b> plan.</p>
+                    </div>
+                </section>
+            </div>
+        </div>
+    </div>
+    <div id="front-shop" class="row small-up-1 medium-up-3 large-up-4" data-equalizer>
+    <?php $args = array(
+         'number'     => $number,
+         'orderby'    => 'title',
+         'order'      => 'ASC',
+         'hide_empty' => $hide_empty,
+         'include'    => $ids
+    );
+    $product_categories = get_terms( 'product_cat', $args );
+    $count = count($product_categories);
+    if ( $count > 0 ){
+        foreach ( $product_categories as $product_category ) { ?>
+            <div class="front-product-wrapper column">
+                <div class="front-product-container" data-equalizer-watch>
+                    <div class="products-image-container">
+                    <?php
+                            /**
+                             * woocommerce_before_subcategory_title hook
+                             *
+                             * @hooked woocommerce_subcategory_thumbnail - 10
+                             */
+                            do_action( 'woocommerce_before_subcategory_title', $product_category );
+                    ?>
+                    </div> 
+                    <div class="front-product-content-container">
+                        <?php 
+                        echo '<h4><a href="' . get_term_link( $product_category ) . '">' . $product_category->name . '</a></h4>';
+                        $args = array(
+                            'posts_per_page' => -1,
+                            'tax_query' => array(
+                                'relation' => 'AND',
+                                array(
+                                    'taxonomy' => 'product_cat',
+                                    'field' => 'slug',
+                                    // 'terms' => 'white-wines'
+                                    'terms' => $product_category->slug
+                                )
+                            ),
+                            'post_type' => 'product',
+                            'orderby' => 'title,'
+                        );
+                        $products = new WP_Query( $args );
+                        echo "<ul>";
+
+                        while ( $products->have_posts() ) {
+
+                            $products->the_post();
+                            ?>
+                                <li>
+                                    <a href="<?php the_permalink(); ?>">
+                                        <?php the_title(); ?>
+                                    </a>
+                                </li>
+                            <?php
+                        }
+                        if (!$products->have_posts()) {
+                            echo "TBD";
+                        }
+                        echo "</ul>";?>
+                    </div>
+                </div>
+            </div>
+        <?php } ?>
+    <?php } ?>
+    </div>
+    <div id="content-wrapper">
+        <div class="block-row" data-equalizer data-equalize-on="medium" data-equalize-by-row="false">
+            <?php
+            // get_template_part('parts/glm-blocks');
+            ?>
+        </div>
+        <div class="row">
+            <div class="small-12 columns">
+                <?php get_template_part('parts/main-content');?>
+            </div>
+        </div>
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/header.php b/root/sections/header.php
new file mode 100644 (file)
index 0000000..726f945
--- /dev/null
@@ -0,0 +1,15 @@
+<header>
+    <div class="row">
+        <div id="logo-hide" class="small-12 large-3 columns text-center large-text-left">
+            <a href="<?php bloginfo('url')?>"><img src="<?php bloginfo('template_url');?>/assets/capstone-leadership-logo.png"></a>
+        </div>
+        <div id="slogan" class="small-12 large-9 text-center large-text-right columns">
+            <a href="<?php bloginfo('url')?>"><img src="<?php bloginfo('template_url');?>/assets/capstone-leadership-logo.png"></a>
+            <h1>You Want Healthcare to be Great. We Do Too.</h1>
+            <h2>Let's Work Together.</h2>
+        </div>
+        <div id="exspendable-slogan" class="large-3 columns show-for-large">
+            <h1> Let's Work Together.</h1>
+        </div>
+    </div>
+</header>
\ No newline at end of file
diff --git a/root/sections/interior-page.php b/root/sections/interior-page.php
new file mode 100644 (file)
index 0000000..2173b42
--- /dev/null
@@ -0,0 +1,54 @@
+<main class="page-inside">
+    <?php if (get_page_template_slug( $post->ID ) == "partners-blocks") { ?>
+    <div id="content-wrapper" class="partners-page-wrapper">
+    <?php } else { ?>
+    <div id="content-wrapper">
+    <?php } ?>
+        <div class="row">
+            <?php if(function_exists('bcn_display') && !is_front_page())
+            {
+                echo "<div class=\"breadcrumbs\">";
+                bcn_display();
+                echo "</div>";
+            }
+            ?>
+        </div>
+
+        <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 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>";
+            }
+            ?>
+        </div>
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/off-canvas.php b/root/sections/off-canvas.php
new file mode 100644 (file)
index 0000000..bda0d38
--- /dev/null
@@ -0,0 +1,48 @@
+<div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="large">
+    <div class="title-bar-left">
+        <button class="menu-icon" type="button" data-open="offCanvasLeft"></button>
+        <span class="title-bar-title">Menu</span>
+    </div>
+</div>
+<div class="off-canvas position-left" id="offCanvasLeft" data-off-canvas>
+    <?php glm_theme_mobile_off_canvas(); ?>
+    <?php get_template_part('parts/search-form');?>
+    <?php if (function_exists('glm_get_clientinfo_option')) :?>
+    <ul class="social horizontal">
+        <li class="facebook"><a href="#" target="_blank"></a></li>
+        <li class="twitter"><a href="#" target="_blank"></a></li>
+        <li class="linkin"><a href="#" target="_blank"></a></li>
+        <li class="youtube"><a href="#" target="_blank"></a></li>
+        <li class="insta"><a href="#" target="_blank"></a></li>
+        <li class="google"><a href="#" target="_blank"></a></li>
+    </ul>
+    <ul class="vertical">
+        <li><?php echo glm_get_clientinfo_option('businessName');?></li>
+        <?php if (glm_get_clientinfo_option('address')):?>
+            <li><?php echo glm_get_clientinfo_option('address');?></li>
+            <li><?php echo glm_get_clientinfo_option('city');?>, <?php echo glm_get_clientinfo_option('state');?>
+                <?php echo glm_get_clientinfo_option('zip');?></li>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('address2')):?>
+            <li><?php echo glm_get_clientinfo_option('address2');?></li>
+            <li><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?>
+                <?php echo glm_get_clientinfo_option('zip2');?></li>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('phone')) :?>
+            <li><?php echo glm_get_clientinfo_option('phone');?></li>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('phone2')) :?>
+            <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('phone2');?></span>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('email')) :?>
+            <span class="bullet"> &#8226; </span><span><?php echo glm_get_clientinfo_option('email');?></span>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('fax')) :?>
+            <li><?php echo glm_get_clientinfo_option('fax');?></li>
+        <?php endif;?>
+        <?php if (glm_get_clientinfo_option('extra')) :?>
+            <li><?php echo glm_get_clientinfo_option('extra');?></li>
+        <?php endif;?>
+    </ul>
+    <?php endif;?>
+</div>
\ No newline at end of file
diff --git a/root/sections/search.php b/root/sections/search.php
new file mode 100644 (file)
index 0000000..3a63a71
--- /dev/null
@@ -0,0 +1,111 @@
+
+<main class="search-results">
+    <div class="row">
+        <?php if (get_search_query() == "") { ?>
+        <br><h2 class="search-result-header small-12 columns">Please enter a query in the search box. </h2>
+        <?php } else { ?>
+        <br><h2 class="search-result-header small-12 columns">Search Results for "<?php echo get_search_query(); ?>"</h2>
+    </div>
+
+    <div class="row">
+        <div id="blog-posts-over" class="small-12 columns">
+            <?php if(have_posts()) : while(have_posts()): the_post();?>
+                <?php if (is_search() && (isset($_GET['searchType']) && $_GET['searchType'] == 'blog') && ($post->post_type=='page')) continue; ?>
+                <div class="row content search-result-container">
+                    <div class="small-11 small-centered columns">
+                        <article id="<?php the_ID()?>" <?php post_class()?>>
+                            <header class="entry-header">
+                                <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
+                                <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+                            </header>
+
+
+                <!-- Start of the Contextual/Highlight Search -->
+                                <?php
+                                // Configuration
+                                $max_length = 400; // Max length in characters
+                                $min_padding = 30; // Min length in characters of the context to place around found search terms
+
+                                // Load content as plain text
+                                global $wp_query, $post;
+                                $content = (!post_password_required($post) ? strip_tags(preg_replace(array("/\r?\n/", '@<\s*(p|br\s*/?)\s*>@'), array(' ', "\n"), apply_filters('the_content', $post->post_content))) : '');
+
+                                // Search content for terms
+                                $terms = $wp_query->query_vars['search_terms'];
+                                if ( preg_match_all('/'.str_replace('/', '\/', join('|', $terms)).'/i', $content, $matches, PREG_OFFSET_CAPTURE) ) {
+                                    $padding = max($min_padding, $max_length / (2*count($matches[0])));
+
+                                  // Construct extract containing context for each term
+                                  $output = '';
+                                  $last_offset = 0;
+                                  foreach ( $matches[0] as $match ) {
+                                    list($string, $offset) = $match;
+                                    $start  = $offset-$padding;
+                                    $end = $offset+strlen($string)+$padding;
+                                    // Preserve whole words
+                                    while ( $start > 1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$start-1}) ) $start--;
+                                    while ( $end < strlen($content)-1 && preg_match('/[A-Za-z0-9\'"-]/', $content{$end}) ) $end++;
+                                    $start = max($start, $last_offset);
+                                    $context = substr($content, $start, $end-$start);
+                                    if ( $start > $last_offset ) $context = '...'.$context;
+                                    $output .= $context;
+                                    $last_offset = $end;
+                                  }
+
+                                  if ( $last_offset != strlen($content)-1 ) $output .= '...';
+                                } else {
+                                  $output = $content;
+                                }
+
+                                if ( strlen($output) > $max_length ) {
+                                  $end = $max_length-3;
+                                  while ( $end > 1 && preg_match('/[A-Za-z0-9\'"-]/', $output{$end-1}) ) $end--;
+                                  $output = substr($output, 0, $end) . '...';
+                                }
+
+                                // Highlight matches
+                                $context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
+                                ?>
+
+                                <p class="search_result_context">
+                                  <?php echo $context ?>
+                                </p>
+                                <p>
+                                  <a href="<?php the_permalink() ?>" rel="bookmark">Read this entry</a>
+                                </p>
+                <!-- End of the Contextual/Highlight Search -->
+
+                        <?php //echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
+                        <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+                            <?php
+                            if (has_category()) {
+                                $post_categories = wp_get_post_categories( get_the_ID() );
+                                $cats = array();
+                                echo 'This entry was posted ';
+                                echo 'in';
+                                foreach($post_categories as $c){
+                                    $cat = get_category( $c );
+                                    $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
+                                    echo ', <a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'">'. $cat->name .'</a>';
+                                }
+                                echo '.';
+                            }
+                            ?>
+                        </footer>
+                    </article>
+                </div>
+            </div>
+            <?php endwhile; ?>
+            <div class="navigation">
+                <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+            </div><!-- /.navigation -->
+            <?php else: ?>
+            <div id="post-404" class="noposts">
+                <p><?php _e('Sorry, no results were found.');?></p>
+            </div><!-- /#post-404 -->
+            <?php endif;?>
+        </div>
+
+        <?php } ?> <!-- end empty query check -->
+    </div>
+</main>
\ No newline at end of file
diff --git a/root/sections/top-bar.php b/root/sections/top-bar.php
new file mode 100644 (file)
index 0000000..86b1a3a
--- /dev/null
@@ -0,0 +1,5 @@
+<div id="main-menu" class="top-bar">
+    <div class="top-bar-left">
+        <?php glm_theme_top_bar(); ?>
+    </div>
+</div>
\ No newline at end of file