Place top_content CF call back in template-selected sections to avoid breaking county...
authorLaury GvR <laury@gaslightmedia.com>
Thu, 14 Feb 2019 22:40:22 +0000 (17:40 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 14 Feb 2019 22:40:22 +0000 (17:40 -0500)
sections/interior-page.php

index 0c2a435..fff5282 100644 (file)
 
     <div id="content-wrapper">
 
-        <?php if ( get_field( "top_content" ) ) { ?>
-            <div class="row">
-                <div class="small-12 columns">
-                    <?php echo the_field('top_content',$post->ID); ?>
-                </div>
-            </div>
-        <?php } ?>
         <?php switch($template){
             case "glm-members-only-template": ?>
                 <div class="row">
             <?php break; ?>
 
             <?php case "no-sidebar-template": ?>
+                <?php if ( get_field( "top_content" ) ) { ?>
+                    <div class="row">
+                        <div class="small-12 columns">
+                            <?php echo the_field('top_content',$post->ID); ?>
+                        </div>
+                    </div>
+                <?php } ?>
                 <div class="row">
                     <div class="small-12 columns" data-equalizer-watch>
                         <?php get_template_part('parts/main-content');?>
             <?php break; ?>
             
             <?php default: ?>
+                <?php if ( get_field( "top_content" ) ) { ?>
+                    <div class="row">
+                        <div class="small-12 columns">
+                            <?php echo the_field('top_content',$post->ID); ?>
+                        </div>
+                    </div>
+                <?php } ?>
                 <div class="row">
                     <div class="small-12 large-8 columns" data-equalizer-watch>
                         <?php get_template_part('parts/main-content'); ?>