RE: What is WordPress loop?

What is WordPress loop?

B Mathur Team Leader Asked on February 11, 2017 in WORDPRESS.
Add Comment
1 Answers
The Loop is PHP code used by WordPress to display post data.Using the code, WordPress processes each post data to be fetched on the current page, and formats it according to wordpress theme’s instructions.
<?php if ( have_posts() ) : ?>
    <?php while ( have_posts() ) : the_post(); ?>
        // post content
    <?php endwhile; ?>
<?php endif; ?>
Team Leader Answered on March 9, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.