Little Flower - Springfield, IL

Style out the category Pages

Assigned to
Kyle Sullivan, Web Development at Diocesan Kyle S.
Notes
Style out the category pages. Right now, no posts display even if they are in the category. Thanks.

Comments & Events

Kyle Sullivan, Web Development at Diocesan
This is a prime example of why we need to stop using "News & Events" as a Post Category.

Here's the hacky code I created to show the content in these Category Archives.
<?php if(have_posts()) :
  if(get_queried_object() -> slug === "news-events") :
    $today = date( 'Y-m-d' ); ?>
    <div class="resultContainer limit-width limit-max-width">
      <?= do_shortcode('[ajax_load_more container_type="div" post_type="post" posts_per_page="6" category="'. get_queried_object() -> slug .'" meta_key="the_date" meta_value="'. $today .'" meta_compare=">=" meta_type="DATE" order="ASC" orderby="meta_value"]'); ?>
    </div>

    <div class="resultContainer limit-width limit-max-width">
      <?= do_shortcode('[ajax_load_more container_type="div" post_type="post" posts_per_page="6" category="'. get_queried_object() -> slug .'" order="DESC" orderby="publish_date"]'); # meta_key="the_date" meta_compare="NOT EXISTS" ?>
    </div>
  <?php else : ?>
    <div class="resultContainer limit-width limit-max-width">
      <?= do_shortcode('[ajax_load_more container_type="div" post_type="post" posts_per_page="6" category="'. get_queried_object() -> slug .'" order="DESC" orderby="publish_date"]'); ?>
    </div>
  <?php endif; ?>
<?php else :
  get_template_part( 'template-parts/content', 'none' );

endif;
The issue that kept so many posts from being rendered is that they either (A) did not have the ACF field for the_date set or (B) the date set has passed.
Kyle Sullivan, Web Development at Diocesan
Please reopen this task with specific instructions once we figure out exactly what they want.

My recommendation is to split News into its own category and Events into its own category (or CPT).
Kyle Sullivan, Web Development at Diocesan
Kyle Sullivan completed this to-do.