-
Notifications
You must be signed in to change notification settings - Fork 1
/
loop-page.php
executable file
·40 lines (36 loc) · 1.12 KB
/
loop-page.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
40
<?php
/**
* The loop that displays a page.
*
* 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-page.php.
*
* @since 0.0.1
*/
essence_show_template_file( __FILE__ );
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'essence' ), 'after' => '</div>' ) );
edit_post_link( __( 'Edit', 'essence' ), '<span class="edit-link">', '</span>' );
?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php
comments_template( '', true );
} // end of the loop.
}