+<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-archive">
<div class="row">
<?php get_template_part('parts/blog-content-area'); ?>
- <main class="blog-single">
- <div class="row">
- <div id="blog-posts-over" class="small-12 medium-9 columns">
- <?php if(have_posts()) : while(have_posts()): the_post();?>
- <div class="row blog-post-container">
- <div class="small-11 small-centered columns">
- <div class="row">
- <div class="small-12 columns">
- <?php get_template_part('parts/blog-text-single'); ?>
- <?php if ( comments_open() || get_comments_number() ) :
- comments_template();
- endif; ?>
- </div>
- </div>
- </div>
- </div>
- <?php endwhile; ?>
- <?php else: ?>
- <div id="post-404" class="noposts">
- <p><?php _e('Sorry, no results were found.');?></p>
- </div><!-- /#post-404 -->
- <?php endif;?>
- </div>
- <?php get_template_part('parts/blog-sidebar-r'); ?>
+<div id="header-crowdriff">
+ <?php
+ if (function_exists('the_field')) {
+ $myCats = get_the_category();
+ if ($myCats && $myCats[0]) {;
+ echo the_field('post_crowdriff',$myCats[0]);
+ }
+ }
+ ?>
+</div>
+<main class="blog-single">
+ <div class="row">
+ <div id="blog-posts-over" class="small-12 medium-9 columns">
+ <?php if(have_posts()) : while(have_posts()): the_post();?>
+ <div class="row blog-post-container">
+ <div class="small-11 small-centered columns">
+ <div class="row">
+ <div class="small-12 columns">
+ <?php get_template_part('parts/blog-text-single'); ?>
+ <?php if ( comments_open() || get_comments_number() ) :
+ comments_template();
+ endif; ?>
</div>
- </main>
\ No newline at end of file
+ </div>
+ </div>
+ </div>
+ <?php endwhile; ?>
+ <?php else: ?>
+ <div id="post-404" class="noposts">
+ <p><?php _e('Sorry, no results were found.');?></p>
+ </div><!-- /#post-404 -->
+ <?php endif;?>
+ </div>
+ <?php get_template_part('parts/blog-sidebar-r'); ?>
+ </div>
+</main>
\ No newline at end of file