Place blog home/archive/category header section within its main element
authorLaury GvR <laury@gaslightmedia.com>
Wed, 27 Mar 2019 19:28:44 +0000 (15:28 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 27 Mar 2019 19:28:44 +0000 (15:28 -0400)
sections/blog-archive.php
sections/blog-category.php

index 5a43fd5..48a7b44 100644 (file)
@@ -1,9 +1,9 @@
-<?php if ( function_exists('the_field') && get_field('frontpage_crowdriff', get_option( 'page_on_front' ) ) ) { ?>
-    <div id="header-crowdriff">
-        <?php the_field('frontpage_crowdriff', get_option( 'page_on_front' ) ); ?>
-    </div>
-<?php } ?>
 <main class="blog-archive">
+    <?php if ( function_exists('the_field') && get_field('frontpage_crowdriff', get_option( 'page_on_front' ) ) ) { ?>
+        <div id="header-crowdriff">
+            <?php the_field('frontpage_crowdriff', get_option( 'page_on_front' ) ); ?>
+        </div>
+    <?php } ?>
     <div class="row">
         <?php get_template_part('parts/blog-content-area'); ?>
         <?php get_template_part('parts/blog-sidebar-r'); ?>
index 28482c8..deb6ab9 100644 (file)
@@ -1,15 +1,14 @@
-
-<div id="header-crowdriff">
-    <?php 
-        if (function_exists('the_field')) {
-            $term = get_queried_object();
-            if ($term) {
-                echo get_field('post_crowdriff', get_queried_object());
-            }
-        }
-    ?>
-</div>
 <main class="blog-category">
+    <div id="header-crowdriff">
+        <?php 
+            if (function_exists('the_field')) {
+                $term = get_queried_object();
+                if ($term) {
+                    echo get_field('post_crowdriff', get_queried_object());
+                }
+            }
+        ?>
+    </div>
     <div class="row">
         <?php get_template_part('parts/blog-content-area'); ?>
         <?php get_template_part('parts/blog-sidebar-r'); ?>