-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
49 lines (26 loc) · 1.44 KB
/
single.php
File metadata and controls
49 lines (26 loc) · 1.44 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
41
42
43
44
45
46
47
48
49
<?php get_header(); ?>
<div class="content section-inner">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="posts">
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php get_template_part( 'content', get_post_format() ); ?>
<div class="post-nav">
<?php
$next_post = get_next_post();
if ( ! empty( $next_post ) ) : ?>
<a class="post-nav-newer" title="<?php printf( __( 'Next post: %s', 'nayncuration' ), esc_attr( get_the_title( $next_post ) ) ); ?>" href="<?php echo get_permalink( $next_post->ID ); ?>"><?php echo get_the_title( $next_post ); ?> »</a>
<?php endif;
$prev_post = get_previous_post();
if ( ! empty( $prev_post ) ) : ?>
<a class="post-nav-older" title="<?php printf( __( 'Previous post: %s', 'nayncuration' ), esc_attr( get_the_title( $prev_post ) ) ); ?>" href="<?php echo get_permalink( $prev_post->ID ); ?>">« <?php echo get_the_title( $prev_post ); ?></a>
<?php endif; ?>
<div class="clear"></div>
</div><!-- .post-nav -->
<?php endwhile;
else: ?>
<p><?php _e( "We couldn't find any posts that matched your query. Please try again.", "nayncuration" ); ?></p>
<?php endif; ?>
</div><!-- .post -->
</div><!-- .posts -->
</div><!-- .content section-inner -->
<?php get_footer(); ?>