What is WordPress loop?
What is WordPress loop?
|
The WordPress Loop is the code that WordPress uses to display content on your website. Take your index. php template, for example. In a basic blogging theme, this template is generally used to display several posts or post excerpts on your home page. The index.php template uses the WordPress Loop in order to do this.
|
The WordPress Loop is the code that WordPress uses to display content on your website.
Below is an example of a simple WordPress Loop. if ( have_posts() ) : while ( have_posts() ) : the_post(); // // Post Content here // endwhile; // end while endif; // end if ?> |
A loop used to display list of post on pages.It is a php code to display the posts.
if ( have_posts() ) { while ( have_posts() ) { the_post(); // // Post here // } // end while } // end if ?> |
All times are GMT -7. The time now is 03:01 AM. |
Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.