-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
113 lines (93 loc) · 2.42 KB
/
Copy pathsingle.php
File metadata and controls
113 lines (93 loc) · 2.42 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* Template Name: Single Post
* This is the single posy template file for a WordPress theme.
*
* @package movaone
*/
?>
<?php get_header(); ?>
<main id="main">
<div class="main__wrap">
<div class="container">
<div class="inner-wrap">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<article class="post-<?php the_ID(); ?> single-post" <?php post_class(); ?>>
<div class="heading">
<h1 class="page-title"><?php the_title(); ?></h1>
</div>
<div class="featured-image">
<a href="<?php the_permalink(); ?>">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
</a>
</div>
<p class="post-info">
<?php esc_html_e( 'By', 'movaone' ); ?><span class="post-author"> <a
href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php the_author(); ?></a></span>
—
<time
datetime="<?php the_time( 'Y-m-d H:i:s' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time>
<?php esc_html_e( ' — Posted in', 'movaone' ); ?>
<span class="category"><?php the_category( ', ' ); ?></span>
</p>
<div class="content-area">
<?php the_content(); ?>
<?php
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'movaone' ),
'after' => '</div>',
)
);
?>
<?php
if ( has_tag() ) {
?>
<p class="post-tags">
<?php the_tags( '<span>' . ( 'Tags:' ) . '</span> ', ', ', '</p>' ); ?> <br>
<?php } else { ?>
<br>
<?php } ?>
</div>
<?php
get_template_part( 'parts/related-posts' );
?>
<?php
get_template_part( 'parts/author-infobox' );
?>
<?php
get_template_part( 'parts/pagination' );
?>
<div class="comment-block">
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || '0' !== get_comments_number() ) :
comments_template();
endif;
?>
</div>
</article>
<?php
endwhile;
else :
esc_html_e( 'Sorry, nothing found!', 'movaone' );
endif;
?>
<?php get_sidebar(); ?>
</div>
<!--/ inner wrap-->
</div>
<!--/ container-->
</div>
<!--/ main__wrap-->
</main>
<?php
get_footer();