Created
May 1, 2012 17:12
-
-
Save sguzik/2569719 to your computer and use it in GitHub Desktop.
The most basic PHP loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The loop starts here: | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
/* and ends here: | |
<?php endwhile; else: ?> | |
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment