What is wordpress Loop
WordPress Loop is a block of php functions to display wordpress Post. For example in theme design the first page index.php is generally used to display the list of posts.
Below is an example of showing wordpress posts in index.php file.
<?php if ( have_posts() ) : while ( have_posts() ) :  // Loop start here the_post(); // // Post Content here // endwhile; // end while , Loop end here endif; // end ifThe first line of code telling that , if there are some posts then display it. And the second line is actually starting the loop till end while statement.
The list of functions can be used inside the loop are –
the_title(); – The title of current post
the_date(); – Only output the date if the current post’s date is different from the previous one output.
the_author(); – Display the name of the author of the current post.
the_content(); – Display the content of the current post.