Skip to content

Instantly share code, notes, and snippets.

@melissacabral
Created November 7, 2012 17:01
Show Gist options
  • Save melissacabral/4032974 to your computer and use it in GitHub Desktop.
Save melissacabral/4032974 to your computer and use it in GitHub Desktop.
Basic wordpress loop
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- template tags and HTML go here, like this: -->
<h2><?php the_title(); ?></h2>
<?php endwhile; else:?>
<h2>Sorry, no posts found</h2>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment