Separate vcarrd stuff into new template file.
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 14 Oct 2014 17:52:25 +0000 (13:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 14 Oct 2014 17:52:25 +0000 (13:52 -0400)
adding in plugin for the vcard information.

footer.php
functions.php
index.php~ [deleted file]
sidebar.php
style.css
vcard.php [new file with mode: 0644]

index 64a5a93..093d3d0 100644 (file)
@@ -9,19 +9,7 @@
                     </div><!-- /#main -->
 
                     <footer class="small-6 show-for-small-only small-centered columns">
-                        <div class="vcard">
-                            <h2 class="fn org"><?php bloginfo('name');?></h2>
-                            <p class="street-address">8110 W. Hazel Rd</p>
-                            <p>
-                                <span flexy:if="city" class="locality">Mears,</span>
-                                <abbr class="region" title="Michigan">MI</abbr>
-                                <span class="postal-code">49436</span>
-                            </p>
-                            <p class="tel">
-                                <span class="type">Phone</span>:
-                                <span class="value">231-873-8400</span>
-                            </p>
-                        </div><!-- /#address -->
+                        <?php get_template_part('vcard');?>
                     </footer>
                     <div id="copyright">
                         Copyright&copy;<?php echo date('Y');?> <?php bloginfo('name');?> - Produced by <a href="http://www.gaslightmedia.com">Gaslight Media</a>, All Rights Reserved.
index d0ca581..dfcca2e 100644 (file)
@@ -3,6 +3,11 @@ if (!function_exists('glmAddSubs')) {
     $ancestorId   = null;
     $includePages = array();
     $frontPageId  = get_option('page_on_front');
+    function glm_get_quicksite_option($name)
+    {
+        $settings = get_option('glmQuickSite_settings');
+        return ($settings[$name]) ? $settings[$name]: null;
+    }
     function glm_wp_list_pages()
     {
         global $ancestorId, $includePages, $post;
diff --git a/index.php~ b/index.php~
deleted file mode 100755 (executable)
index b947999..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php get_header();?>
-
-        <?php get_sidebar();?>
-        <div id="main" class="small-12 medium-10 columns">
-            <?php if(function_exists('bcn_display') && !is_front_page())
-                {
-                    echo "<div class=\"breadcrumbs\">";
-                    bcn_display();
-                    echo "</div>";
-                }?>
-            <div id="toolbox">
-                <?php if(have_posts()) : while(have_posts()): the_post();?>
-                        <?php the_content();?>
-                <?php endwhile; else:?>
-                <p><?php _e('Sorry, no posts yet');?></p>
-                <?php endif;?>
-<?php 
-$pages = get_pages();
-echo '<pre>'.print_r($pages, true).'</pre>';
-$ancestors = get_post_ancestors($post->ID);
-echo '<pre>'.print_r($ancestors, true).'</pre>';       
-?>
-            </div><!-- /#toolbox -->
-<?php get_footer();?>
-
index 18a2af3..e4dc9a7 100644 (file)
                            <?php glm_wp_list_pages();?>
                         </ul>
                         </div>
-                        <div id="address" class="vcard">
-                            <h2 class="fn org"><?php bloginfo('name');?></h2>
-                            <p class="street-address">8110 W. Hazel Rd</p>
-                            <p>
-                                <span flexy:if="city" class="locality">Mears,</span>
-                                <abbr class="region" title="Michigan">MI</abbr>
-                                <span class="postal-code">49436</span>
-                            </p>
-                            <p class="tel">
-                                <span class="type">Phone</span>:
-                                <span class="value">231-873-8400</span>
-                            </p>
-                        </div><!-- /#address -->
+                        <?php get_template_part('vcard');?>
                     </div><!-- /#column -->
                     <aside class="left-off-canvas-menu">
                         <ul class="off-canvas-list">
                             <?php wp_nav_menu(array('ParrotsLanding' => 'header-menu', 'menu_class' => ''));?>
                         </ul>
-                        <div class="vcard">
-                            <h2 class="fn org"><?php bloginfo('name');?></h2>
-                            <p class="street-address">8110 W. Hazel Rd</p>
-                            <p>
-                                <span flexy:if="city" class="locality">Mears,</span>
-                                <abbr class="region" title="Michigan">MI</abbr>
-                                <span class="postal-code">49436</span>
-                            </p>
-                            <p class="tel">
-                                <span class="type">Phone</span>:
-                                <span class="value">231-873-8400</span>
-                            </p>
-                        </div><!-- /#address -->
+                        <?php get_template_part('vcard');?>
                     </aside> <!-- left-off-canvas-menu -->
 
index 3806fa7..d43114f 100644 (file)
--- a/style.css
+++ b/style.css
@@ -1,13 +1,11 @@
 /*
 Theme Name:         Wild Bill's ATVs
-Theme URI:          
 Description:        QuickSite WordPress theme
 Version:            1.0
 Author:             Steve Sutton
 Author URI:         http://www.gaslightmedia.com/
 
-License:            MIT License
-License URI:        http://www.opensource.org/licenses/mit-license.php
+License:            All Rights Reserved
 */
 body {
     margin: 0;
diff --git a/vcard.php b/vcard.php
new file mode 100644 (file)
index 0000000..7f4bbe9
--- /dev/null
+++ b/vcard.php
@@ -0,0 +1,31 @@
+<div class="vcard">
+<h2 class="fn org"><?php echo glm_get_quicksite_option('businessName');?></h2>
+<p class="street-address"><?php echo glm_get_quicksite_option('address');?></p>
+<p>
+    <span flexy:if="city" class="locality"><?php echo glm_get_quicksite_option('city');?>,</span>
+    <abbr class="region"><?php echo glm_get_quicksite_option('state');?></abbr>
+    <span class="postal-code"><?php echo glm_get_quicksite_option('zip');?></span>
+</p>
+
+<?php if (glm_get_quicksite_option('address2')):?>
+<p class="street-address"><?php echo glm_get_quicksite_option('address2');?></p>
+<p>
+    <span flexy:if="city" class="locality"><?php echo glm_get_quicksite_option('city2');?>,</span>
+    <abbr class="region"><?php echo glm_get_quicksite_option('state2');?></abbr>
+    <span class="postal-code"><?php echo glm_get_quicksite_option('zip2');?></span>
+</p>
+<?php endif;?>
+
+<?php if (glm_get_quicksite_option('phone')):?>
+<p class="tel">
+    <span class="type">phone</span>:
+    <span class="value"><?php echo glm_get_quicksite_option('phone');?></span>
+</p>
+<?php endif;?>
+<?php if (glm_get_quicksite_option('fax')):?>
+<p class="tel">
+    <span class="type">fax</span>:
+    <span class="value"><?php echo glm_get_quicksite_option('fax');?></span>
+</p>
+<?php endif;?>
+</div><!-- /#address -->