What is The Loop in WordPress?
The most simple example of The Loop is the following code:
<?php if ( have_posts() ): while ( have_posts() ) : the_post(); ?> <?php endwhile; endif; ?>
The Loop is the main part of each theme – it is the core of each WordPress site. If you find a instruction to place piece of code “within The Loop” you should place it before the endwhile; element that closes the cycle.