-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
64 lines (52 loc) · 1.9 KB
/
single.php
File metadata and controls
64 lines (52 loc) · 1.9 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Single Post Template
*
* @package devstarter
*/
get_header(); ?>
<main class="site-content" id="main-content">
<div class="starter-container">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post single-post' ); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'starter-featured' ); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php starter_posted_on(); ?>
<?php starter_posted_by(); ?>
</div>
</header>
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'devstarter' ),
'after' => '</div>',
) );
?>
</div>
<footer class="entry-footer">
<?php
$tags = get_the_tag_list( '<span class="tags">', ', ', '</span>' );
if ( $tags ) echo wp_kses_post( $tags );
?>
</footer>
</article>
<?php
the_post_navigation( array(
'prev_text' => '« %title',
'next_text' => '%title »',
) );
?>
<?php if ( comments_open() || get_comments_number() ) : ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php endwhile; ?>
</div>
</main>
<?php get_footer(); ?>