changed slideshow partial to a widget area for meta slider
authorIan Weller <ian@gaslightmedia.com>
Wed, 2 Mar 2016 14:01:22 +0000 (09:01 -0500)
committerIan Weller <ian@gaslightmedia.com>
Wed, 2 Mar 2016 14:01:22 +0000 (09:01 -0500)
root/functions.php
root/parts/slide-show.php

index e38572a..1c2e5b9 100644 (file)
@@ -21,6 +21,11 @@ if (!function_exists('glm_quicksite_widget_init')) {
         //    'id'          => 'sidebar-f',
         //    'description' => __('Appears in Footer Area')
         //));
+        register_sidebar(array(
+            'name'        => __('Slideshow'),
+            'id'          => 'slideshow',
+            'description' => __('Meta Slider/Slideshow Area')
+        ));
     }
 
 }
index e566daa..94844b5 100644 (file)
@@ -1,6 +1,7 @@
-<?php if (is_front_page()) {
-    echo '<div id="slideshow">';
-    echo do_shortcode("[metaslider id=27]");
-    echo '</div>';
-}
-?>
+<?php if (is_front_page()) : ?>
+       <div id="slideshow">
+         <?php if ( is_active_sidebar( 'slideshow' ) ) : ?>
+           <?php dynamic_sidebar( 'slideshow' ); ?>
+         <?php endif; ?>
+       </div>
+<?php endif; ?>