-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.php
More file actions
31 lines (22 loc) · 1.15 KB
/
Copy pathloop.php
File metadata and controls
31 lines (22 loc) · 1.15 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
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail()) : ?>
<a href="<?php the_permalink(); ?>" title="<?php sprintf( __( 'Permanent Link to %s', 'weaver' ), the_title_attribute( 'echo=0' ) ); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
<h2 class="post-title">
<a href="<?php the_permalink(); ?>" title="<?php sprintf( __('Permanent Link to %s', 'weaver' ), the_title_attribute( 'echo=0' ) ); ?><?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<aside class="post-meta">
<span class="date"><?php the_time('F j, Y'); ?> <?php the_time('g:i a'); ?></span>
<span class="author"><?php _e( 'Published by', 'weaver' ); ?> <?php the_author_posts_link(); ?></span>
<span class="comments"><?php comments_popup_link( __( 'Leave a comment', 'weaver' ), __( '1 Comment', 'weaver' ), __( '% Comments', 'weaver' )); ?></span>
</aside>
<?php the_excerpt(); ?>
</article>
<?php endwhile; else: ?>
<article>
<h2 class="post-title"><?php _e( 'Sorry, nothing found.', 'weaver' ); ?></h2>
</article>
<?php endif; ?>