Uh oh!
There was an error while loading. Please reload this page.
forked from roots/sage
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.php
More file actions
Latest commit
40 lines (38 loc) · 1.46 KB
/
Copy pathloop.php
File metadata and controls
40 lines (38 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php/* If there are no posts to display, such as an empty archive page */?>
<?phpif (!have_posts()) { ?>
<div class="alert alert-block fade in">
<a class="close" data-dismiss="alert">×</a>
<p><?php_e('Sorry, no results were found.', 'roots'); ?></p>
</div>
<?phpget_search_form(); ?>
<?php } ?>
<?php/* Start loop */?>
<?phpwhile (have_posts()) : the_post(); ?>
<?phproots_post_before(); ?>
<article id="post-<?phpthe_ID(); ?>" <?phppost_class(); ?>>
<?phproots_post_inside_before(); ?>
<header>
<h2><a href="<?phpthe_permalink(); ?>"><?phpthe_title(); ?></a></h2>
<?phproots_entry_meta(); ?>
</header>
<div class="entry-content">
<?phpif (is_archive() || is_search()) { ?>
<?phpthe_excerpt(); ?>
<?php } else { ?>
<?phpthe_content(); ?>
<?php } ?>
</div>
<footer>
<?php$tags = get_the_tags(); if ($tags) { ?><p><?phpthe_tags(); ?></p><?php } ?>
</footer>
<?phproots_post_inside_after(); ?>
</article>
<?phproots_post_after(); ?>
<?phpendwhile; /* End loop */?>
<?php/* Display navigation to next/previous pages when applicable */?>
<?phpif ($wp_query->max_num_pages > 1) { ?>
<nav id="post-nav" class="pager">
<div class="previous"><?phpnext_posts_link(__('← Older posts', 'roots')); ?></div>
<div class="next"><?phpprevious_posts_link(__('Newer posts →', 'roots')); ?></div>
</nav>
<?php } ?>