Agatha - Miami, FL

Parish News Section is pulling most recent posts, not based on category defined.

Assigned to
Kyle Sullivan, Web Development at Diocesan Kyle S.
Notes
On the homepage, there is an option for the category to grab posts from, but it doesn't seem to be working because right now it is pulling the most recent posts published, or so it looks to me.

Comments & Events

Cody Armock, Web Content Specialist at Diocesan
The News and Events page, if you click to view all will also show all posts, no matter the category. Don't think we want that.
Kyle Sullivan, Web Development at Diocesan
Here's the relevant code that fixed the requested items in template-parts/homepage/home-news.php.
<div class="homeNews limit-width-sm">
  <div class="newsHeader">
    …
    <a href="/parish-news/" class="viewAll">View All</a>
  </div>
  <div class="newsSection">
    <div class="news animated fadeIn">
      <?php $category = get_field('news_and_events')['title']; ?>
      <?= 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"]'); ?>
    </div>
  </div>
</div>
Kyle Sullivan, Web Development at Diocesan
Kyle Sullivan completed this to-do.