How to use loop in wordpress

How to use loop in wordpress

Today we are going to learn how to use loop in WordPress. Well, loop is a very common term in WordPress. Because we need to use this loop to load the WordPress posts and comments.

Here goes an example of loop structure in WordPress.

if(have_posts(): while(have_posts()): the_post();

  echo "Your post contain goes in here";

endwhile;

else:

  echo "You have no post to display";

endif;

Enjoy!

Was this information useful? What other tips would you like to read about in the future? Share your comments, feedback and experiences with us by commenting below!

Total 0 Votes
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Comment

Back To Top
Cool Ajax - Web Development Tutorial Blog
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.