-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
89 lines (77 loc) · 2.49 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
/**
* Single Page template
*
* Template to display posts
*
* @package Minilog
*/
get_header();
?>
<div <?php post_class( 'main' ); ?>>
<?php
while (
have_posts() ) :
the_post();
?>
<div class="entry-meta">
<?php the_time( get_option( 'date_format' ) ); ?>
<?php esc_html_e( ' by ', 'minilog' ); ?>
<?php esc_url( the_author_posts_link() ); ?>
</div> <!-- /entry-meta -->
<div class="entry-header"><?php the_title(); ?></div>
<?php
the_content();
wp_link_pages(
array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'minilog' ) . '</span>',
'after' => '</div>',
'link_before' => '<span class="page-links-number">',
'link_after' => '</span>',
)
);
endwhile;
?>
<!-- Display Categories and tags for the post -->
<div class="taxonomy">
<p><?php the_terms( $post->ID, 'category', __( 'Categories: ', 'minilog' ), '/' ); ?></p>
<p><?php the_tags( __( 'Tags: ', 'minilog' ), '/' ); ?></p>
</div> <!-- /taxonomy -->
</div> <!-- /main -->
<?php get_sidebar(); ?>
<?php if ( is_singular() && get_the_author_meta( 'description' ) ) : // If a user has filled out their description , show a bio on their entries. ?>
<div class="main author-info">
<p class="author-title">
<?php
printf(
/* Translators: Retrieve the author of the current post. */
esc_html__( 'About “%s”', 'minilog' ),
get_the_author()
);
?>
</p>
<div class="author-card">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 60 ); ?>
</div><!-- .author-card -->
<div class="author-description">
<p><?php the_author_meta( 'description' ); ?></p>
<div class="author-link">
<a href="<?php esc_url_e( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php esc_html_e( 'Other posts »', 'minilog' ); ?>
</a>
</div><!-- /author-link -->
</div><!-- /author-description -->
</div><!-- /main /author-info -->
<?php endif; ?>
<!-- Links to access next and previous posts -->
<div class="main">
<?php previous_post_link( '<div class="prev_post">' . esc_html__( 'Previous Post: %link', 'minilog' ) . '</div>', '%title' ); ?>
<?php next_post_link( '<div class="next_post">' . esc_html__( 'Next Post: %link', 'minilog' ) . '</div>', '%title' ); ?>
</div><!-- /posts-navigation -->
<?php
if ( comments_open() || get_comments_number() ) :
comments_template(); // Loads the comments.php template.
endif;
?>
</div> <!-- /container-->
<?php get_footer(); ?>