Separate widget areas for left/right header ads
authorLaury GvR <laury@gaslightmedia.com>
Fri, 30 Jun 2017 18:44:07 +0000 (14:44 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 30 Jun 2017 18:44:07 +0000 (14:44 -0400)
functions.php
sections/header.php

index 0385f62..fdcd620 100644 (file)
@@ -20,9 +20,14 @@ if (!function_exists('glm_quicksite_widget_init')) {
             'description' => __('Meta Slider/Slideshow Area')
         ));
         register_sidebar(array(
-            'name'        => __('Header Ads'),
-            'id'          => 'header-ads',
-            'description' => __('For Ads in the Header')
+            'name'        => __('Header Ads - Left'),
+            'id'          => 'header-ads-left',
+            'description' => __('For left ads in the header')
+        ));
+        register_sidebar(array(
+            'name'        => __('Header Ads - Right'),
+            'id'          => 'header-ads-right',
+            'description' => __('For right ads in the header')
         ));
     }
 
index aea4223..16a9549 100644 (file)
@@ -3,9 +3,19 @@
         <div class="row">
             <div id="ad" class="small-12 columns text-center">
                 <span>-Advertisements-</span>
-                <?php if ( is_active_sidebar( 'header-ads' ) ) : ?>
-                    <?php dynamic_sidebar( 'header-ads' ); ?>
-                <?php endif; ?>
+                <div class="row">
+                    <div class="small-12 text-center medium-6 columns medium-text-right">
+                        <?php if ( is_active_sidebar( 'header-ads-left' ) ) : ?>
+                            <?php dynamic_sidebar( 'header-ads-left' ); ?>
+                        <?php endif; ?>
+                    </div>
+                    <div class="small-12 text-center medium-6 columns medium-text-left">
+                        <?php if ( is_active_sidebar( 'header-ads-right' ) ) : ?>
+                            <?php dynamic_sidebar( 'header-ads-right' ); ?>
+                        <?php endif; ?>
+                    </div>
+                </div>
+
             </div>
         </div>
     <?php } ?>