-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
53 lines (53 loc) · 2.85 KB
/
single.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
45
46
47
48
49
50
51
52
53
<?php get_header(); ?>
<div id="container">
<section id="content" <?php pinboard_content_class(); ?>>
<?php if( have_posts() ) : the_post(); ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="entry">
<header class="entry-header">
<<?php pinboard_title_tag( 'post' ); ?> class="entry-title"><?php the_title(); ?></<?php pinboard_title_tag( 'post' ); ?>>
<?php pinboard_entry_meta(); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php if( has_post_format( 'audio' ) ) : ?>
<p><?php pinboard_post_audio(); ?></p>
<?php elseif( has_post_format( 'video' ) ) : ?>
<p><?php pinboard_post_video(); ?></p>
<?php endif; ?>
<?php the_content(); ?>
<div class="clear"></div>
</div><!-- .entry-content -->
<footer class="entry-utility">
<?php wp_link_pages( array( 'before' => '<p class="post-pagination">' . __( 'Pages:', 'pinboard' ), 'after' => '</p>' ) ); ?>
<?php the_tags( '<div class="entry-tags">', ' ', '</div>' ); ?>
<?php pinboard_social_bookmarks(); ?>
<?php pinboard_post_author(); ?>
</footer><!-- .entry-utility -->
<?php if ($single) { ?>
<div class="nextprev">
<?php if ( get_adjacent_post( $in_same_cat = true, '', $previous = true ) ) : ?>
<span class="prev"><?php previous_post_link('%link', '‹ Previous: %title', true ); ?></span>
<?php else : ?>
<?php $last_post = array_pop( get_boundary_post( $in_same_cat = true, '', $oldest = false ) ); ?>
<span class="prev">‹ <a href="<?php echo get_permalink( $last_post ); ?>">Last: <?php echo $last_post->post_title; ?></a></span>
<?php endif; ?>
<?php if ( get_adjacent_post( $in_same_cat = true, '', $previous = false ) ) : ?>
<span class="next"><?php next_post_link('%link', 'Next: %title ›', true ); ?></span>
<?php else : ?>
<?php $first_post = array_pop( get_boundary_post( $in_same_cat = true, '', $oldest = true ) ); ?>
<span class="next"><a href="<?php echo get_permalink( $first_post ); ?>">First: <?php echo $first_post->post_title; ?> ›</a></span>
<?php endif; ?>
</div>
<?php } ?>
</div><!-- .entry -->
<?php comments_template(); ?>
</article><!-- .post -->
<?php else : ?>
<?php pinboard_404(); ?>
<?php endif; ?>
</section><!-- #content -->
<?php if( ( 'no-sidebars' != pinboard_get_option( 'layout' ) ) && ( 'full-width' != pinboard_get_option( 'layout' ) ) ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
</div><!-- #container -->
<?php get_footer(); ?>