Skip to content

Instantly share code, notes, and snippets.

@ghanbak
Last active December 12, 2015 06:58
Show Gist options
  • Save ghanbak/4732760 to your computer and use it in GitHub Desktop.
Save ghanbak/4732760 to your computer and use it in GitHub Desktop.
If you decide to use a static page for posts and front page, this snippet of php is the loop for the blog listing.

wordpress #WORDPRESS

##Blog List Loop

<?php if ( have_posts() ) : ?>

  	<?php twentyeleven_content_nav( 'nav-above' ); ?>

	<?php /* Start the Loop */ ?>
		<?php while ( have_posts() ) : the_post(); ?>

			<?php get_template_part( 'content', get_post_format() ); ?>

		<?php endwhile; ?>

			<?php twentyeleven_content_nav( 'nav-below' ); ?>

	<?php else : ?>
			
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment