Closed defunctl closed 2 years ago
have_posts()
The following will no longer be tagged as While loop condition is always true. or Unreachable statement - code above always terminates.:
While loop condition is always true.
Unreachable statement - code above always terminates.
<?php if ( have_posts() ) : ?> <div class="archive-loop__items g-3-up"> <?php while ( have_posts() ) : the_post(); get_template_part( 'components/card/card', '', $c->get_extended_card_args( $c->get_meta_primary(), $c->get_meta_secondary() ) ); endwhile; ?> </div> <?php get_template_part( 'components/pagination/loop/loop' ); else : get_template_part( 'components/no_results/no_results' ); endif; ?>
Does this have tests?
What does this do/fix?
have_posts()
function is impureQA
The following will no longer be tagged as
While loop condition is always true.
orUnreachable statement - code above always terminates.
:Tests
Does this have tests?