Organizational Research By

Surprising Reserch Topic

help simplify if while list loop in wordpress


help simplify if while list loop in wordpress  using -'php,wordpress'

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
....
<?php endwhile; endif; ?>


could understand the code on the above well.

1, could i delete the if and while condition? using <?php the_post();?> directly.

2, i feel the if (have_posts()) is the same as the while (have_posts()) .is it  redundance?
    
asked Oct 7, 2015 by deven.bendale
0 votes
11 views



Related Hot Questions



Government Jobs Opening


...