-
Notifications
You must be signed in to change notification settings - Fork 1
/
loop.php
executable file
·39 lines (37 loc) · 1.25 KB
/
loop.php
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
<?php
/**
* The loop that displays posts.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop.php or
* loop-template.php, where 'template' is the loop context
* requested by a template. For example, loop-index.php would
* be used if it exists and we ask for the loop with:
* <code>get_template_part( 'loop', 'index' );</code>
*
* @since 0.0.1
*/
essence_show_template_file( __FILE__ );
/* If there are no posts to display, such as an empty archive page */
if ( ! have_posts() ) {
?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'essence' ); ?></h1>
<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.', 'essence' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php
}
/**
* Start the Loop.
*/
while ( have_posts() ) {
the_post();
get_template_part( 'content', get_post_format() );
} // End the loop. Whew.