-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop.php
44 lines (33 loc) · 1.14 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
40
41
42
43
44
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post title -->
<h2>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<!-- /post title -->
<!-- post details -->
<p>
<small>
<?php _e( 'Published by', 'sebastianbrandes' ); ?> <?php the_author_posts_link(); ?> on <?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?> —
<?php if (comments_open( get_the_ID() ) ) { comments_popup_link( __( 'Leave your thoughts', 'sebastianbrandes' ), __( '1 Comment', 'sebastianbrandes' ), __( '% Comments', 'sebastianbrandes' )); } else { echo 'No Comments'; } ?>
</small>
</p>
<!-- /post details -->
<?php the_excerpt(); ?>
<?php edit_post_link(); ?>
<?php
if (($wp_query->current_post + 1) != ($wp_query->post_count)) {
echo '<hr />';
}
?>
</article>
<!-- /article -->
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h2><?php _e( 'Sorry, nothing to display.', 'sebastianbrandes' ); ?></h2>
</article>
<!-- /article -->
<?php endif; ?>