Agatha - Miami, FL

Homepage - The category doesn't switch where the posts are coming from

Assigned to
Kyle Sullivan, Web Development at Diocesan Kyle S.
Notes
In the backend for the News and Events tab, if I switch the category for the News Section of the Homepage, the News still pull from the Parish News category and not the category selected.

Comments & Events

Kyle Sullivan, Web Development at Diocesan
This now pulls posts based on what category is selected. I changed the applicable code in /DPI Theme/template-parts/homepage/home-news.php to the following.
  <div class="newsSection">
    <div class="news animated fadeIn">
      <?php if(have_rows('news_and_events')) :
        while(have_rows('news_and_events')) : the_row();
          $category = get_sub_field('category')  -> slug;
        endwhile;
        echo do_shortcode('[display-posts category="' . $category . '" posts_per_page="3" orderby="date" wrapper="div" include_excerpt="true" include_excerpt_dash="false" category_display="false" excerpt_length="15" excerpt_more="Read More" excerpt_more_link="true" image_size="medium"]');
      endif; ?>
    </div>
  </div>
Kyle Sullivan, Web Development at Diocesan
Kyle Sullivan completed this to-do.