4 ms·
It's idiomatic to use the if so you can do this <?php if (have_posts()) : while (have_posts()) : the_post() ?> <!-- do loop stuff --> <?php endwh
by vec 13y ago
It's idiomatic to use the if so you can do this
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<!-- do loop stuff -->
<?php endwhile; else : ?>
<!-- no posts found, show a default or error of some sort -->
<?php endif ?>
- sopooneo 13y agoGot it. Thank you.