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” for load posts and comments. Here goes a loop structure in WordPress. Have a  look-

 

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!

Advertisement

Tags:  

Share It

Related Posts