Files
sage/templates/content.php
2013-02-12 14:54:14 -06:00

36 lines
1.1 KiB
PHP

<?php if (!have_posts()) : ?>
<div class="alert alert-block fade in">
<a class="close" data-dismiss="alert">&times;</a>
<p><?php _e('Sorry, no results were found.', 'roots'); ?></p>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class(); ?>>
<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php get_template_part('templates/entry-meta'); ?>
</header>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div>
<footer>
<?php the_tags('<ul class="entry-tags"><li>','</li><li>','</li></ul>'); ?>
</footer>
</article>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages > 1) : ?>
<nav class="post-nav">
<ul class="pager">
<?php if (get_next_posts_link()) : ?>
<li class="previous"><?php next_posts_link(__('&larr; Older posts', 'roots')); ?></li>
<?php endif; ?>
<?php if (get_previous_posts_link()) : ?>
<li class="next"><?php previous_posts_link(__('Newer posts &rarr;', 'roots')); ?></li>
<?php endif; ?>
</ul>
</nav>
<?php endif; ?>