Created
February 21, 2012 02:06
-
-
Save krogsgard/1873007 to your computer and use it in GitHub Desktop.
Twenty Eleven 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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
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
<?php if ( have_posts() ) : ?> | |
<?php twentyeleven_content_nav( 'nav-above' ); ?> | |
<?php /* Start the Loop */ ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<header class="entry-header"> | |
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> | |
</header><!-- .entry-header --> | |
<div class="entry-content"> | |
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> | |
<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?> | |
</div><!-- .entry-content --> | |
</article><!-- #post-<?php the_ID(); ?> --> | |
<?php endwhile; ?> | |
<?php twentyeleven_content_nav( 'nav-below' ); ?> | |
<?php else : ?> | |
<article id="post-0" class="post no-results not-found"> | |
<header class="entry-header"> | |
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1> | |
</header><!-- .entry-header --> | |
<div class="entry-content"> | |
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p> | |
<?php get_search_form(); ?> | |
</div><!-- .entry-content --> | |
</article><!-- #post-0 --> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment