breaking it down to usable chunks
authorIan Weller <ian@gaslightmedia.com>
Wed, 26 Oct 2016 15:25:15 +0000 (11:25 -0400)
committerIan Weller <ian@gaslightmedia.com>
Wed, 26 Oct 2016 15:27:47 +0000 (11:27 -0400)
I broke down the index.php file to work in a sections folder.  It almost
looks like the glmThemeV6.

13 files changed:
root/index.php
root/parts/header-meta.php [new file with mode: 0644]
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 77417cc..3f0fbc4 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 
-     */
-    ?>
-
-  <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>
-
-  <body>
-      <div class="off-canvas-wrap" data-offcanvas>
-        <div class="inner-wrap">
-            <div id="page-wrapper">
-
-<?php
-/*
- * 2. Header
- * The first visible items. Top of the Page
- */
-?>
-
-                    <header>
-                        <div class="row">
-                            
-                        </div>
-<!--
-                        <div class="search-top show-for-large-up">
-                            <?php //get_template_part('parts/search-form');?>
-                        </div>
--->
-                    </header>
-
-<?php
-/*  
- * 2. /Header
- * End of the Header
- */
-?>
-<?php
-/*
- * 3. Top Bar
- * The main navigation for the site. Bar Navigantion
- */
-?>
-
-                    <nav class="top-bar text-center show-for-large-up" data-topbar role="navigation">
-                        <section class="top-bar-section">
-                            <?php glm_theme_top_bar(); ?>
-                        </section>
-                    </nav>
-                    <nav class="tab-bar show-for-medium-down">
-                        <section class="left-small">
-                            <a class="left-off-canvas-toggle menu-icon" href="#"><span>Menu</span></a>
-                        </section>
-                    </nav>
-
-<?php
-/*
- * 3. /Top Bar
- * End of main navigation. End of Bar Navigation
- */
-?>
-<?php
-/*
- * 4. Off Canvas
- * Hidden Off Canvas Menu
- */
-?>
-
-                    <aside class="left-off-canvas-menu hide-for-large-up">
-                        <?php glm_theme_mobile_off_canvas(); ?>
-                        <?php get_template_part('parts/search-form');?>
-                        <?php if (function_exists('glm_get_clientinfo_option')) :?>
-                            <ul>
-                                <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;?>
-                    </aside>
-                    <!--
-                    <aside class="right-off-canvas-menu">
-
-                    </aside>-->
-<?php
-/*
- * 4. /Off Canvas 
- * End of Off Canvas Menu
- */
-?>
-
-<?php
-/*
- * 5. Main
- * Primary Content Area
- */
-?>
-<?php
-/*
- * 5.1. Front Page
- * Front Page Area
- */
-?>
-<?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
- */
-?>
-<?php
-/*
- * 5.2 Blog Home Page
- * Home Page for Posts
- */
-?>
-<?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
- */
-?>
-<?php
-/*
- * 5.3 Blog Archive Page
- * Page for a selected set of Posts
- */
-?>
-<?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
- */
-?>
-<?php
-/*
- * 5.4 Blog Single Post
- * Page for a Post
- */
-?>
-<?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
- */
-?>
-<?php
-/*
- * 5.5 Search Result Page
- * Page for Search Results
- */
-?>
-<?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
- */
-?>
-<?php
-/*
- * 5.6 Interior Page
- * Interior content Pages
- */
-?>
-<?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
- */
-?>
-                    
-<?php
-/*
- * 5. /Main
- * End of Primary Content Area
- */
-?>
-<?php
-/*
- * 6. Footer
- * Footer Area, Bottom of the page.
- */
-?>
-                        <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.
-?>
-<?php
-/*
- * 7. Copyright
- * Copyright Area
- */
-?>
-                <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
- */
-?>
-            </div><!--/#page-wrapper-->
-        <a class="exit-off-canvas"></a>
-        </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-wrap" data-offcanvas>
+            <div class="inner-wrap">
+                <div id="page-wrapper">
+                    <?php
+                    include "sections/header.php"; 
+                    include "sections/top-bar.php";
+                    include "sections/off-canvas.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><!--/#page-wrapper-->
+            <a class="exit-off-canvas"></a>
+            </div><!--End of inner-wrap-->
+        </div><!--End of off-canvas-->
+        <?php wp_footer();?>
+        <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>
+    </body>
+</html>
\ No newline at end of file
diff --git a/root/parts/header-meta.php b/root/parts/header-meta.php
new file mode 100644 (file)
index 0000000..439c6d1
--- /dev/null
@@ -0,0 +1,8 @@
+<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>
\ 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..32313d2
--- /dev/null
@@ -0,0 +1,6 @@
+                    <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>
\ 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..01d5da8
--- /dev/null
@@ -0,0 +1,9 @@
+                    <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>
\ 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..55bb278
--- /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..a2380e2
--- /dev/null
@@ -0,0 +1,7 @@
+                <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>
\ 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..f52e0d7
--- /dev/null
@@ -0,0 +1,40 @@
+                        <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>
\ 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..84d36de
--- /dev/null
@@ -0,0 +1,20 @@
+                    <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>
\ 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..38be909
--- /dev/null
@@ -0,0 +1,19 @@
+<header class="main">
+    <div class="row  medium-uncollapse large-collapse">
+        <div id="logo-tag" class="small-12 text-center medium-12 columns">
+            <?php get_custom_logo($blog_id = 0 );?>
+            <?php the_custom_logo($blog_id = 0 );?>
+            <?php
+            if ( is_front_page() && is_home() ) : ?>
+                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
+            <?php else : ?>
+                <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
+            <?php endif;
+            $description = get_bloginfo( 'description', 'display' );
+            if ( $description || is_customize_preview() ) : ?>
+                <h3 class="site-description"><?php echo $description; ?></h3>
+            <?php endif;
+            ?>
+        </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..cc77ca0
--- /dev/null
@@ -0,0 +1,21 @@
+                    <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>
\ 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..87de2dd
--- /dev/null
@@ -0,0 +1,38 @@
+                    <aside class="left-off-canvas-menu hide-for-large-up">
+                        <?php glm_theme_mobile_off_canvas(); ?>
+                        <?php get_template_part('parts/search-form');?>
+                        <?php if (function_exists('glm_get_clientinfo_option')) :?>
+                            <ul>
+                                <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;?>
+                    </aside>
+                    <!--
+                    <aside class="right-off-canvas-menu">
+
+                    </aside>-->
\ 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..16c6b6e
--- /dev/null
@@ -0,0 +1,110 @@
+        <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..36a5d22
--- /dev/null
@@ -0,0 +1,10 @@
+                    <nav class="top-bar text-center show-for-large-up" data-topbar role="navigation">
+                        <section class="top-bar-section">
+                            <?php glm_theme_top_bar(); ?>
+                        </section>
+                    </nav>
+                    <nav class="tab-bar show-for-medium-down">
+                        <section class="left-small">
+                            <a class="left-off-canvas-toggle menu-icon" href="#"><span>Menu</span></a>
+                        </section>
+                    </nav>
\ No newline at end of file