-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsingle.php
75 lines (63 loc) · 1.87 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage starter
* @since starter 2.0
*/
get_header();
/* Start the Loop */
while ( have_posts() ) :
the_post(); ?>
<div class="content_wrapper single_post_page pt-md-5 pb-5" role="main">
<div class="wrap_single_post_content container-fluid">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<!-- post image -->
<picture>
<?php
echo wp_kses(
starter_img_func(
array(
'img_src' => 'w800',
'img_sizes' => '(max-width: 767px) calc(100vw - 24px), 776px',
'img_id' => get_post_thumbnail_id(),
)
),
wp_kses_allowed_html( 'post' )
);
?>
</picture>
<!-- END post image -->
<!-- post content -->
<div class="entry-content mt-4">
<?php the_content(); ?>
</div>
<!-- END post content -->
<!-- post navigation -->
<?php
$starter_next = starter_get_svg( array( 'icon' => 'bi-chevron-right' ) );
$starter_prev = starter_get_svg( array( 'icon' => 'bi-chevron-left' ) );
$starter_next_label = esc_html__( 'Next post', 'starter' );
$starter_previous_label = esc_html__( 'Previous post', 'starter' );
the_post_navigation(
array(
'next_text' => '<p class="meta-nav">' . $starter_next_label . $starter_next . '</p><p class="post-title">%title</p>',
'prev_text' => '<p class="meta-nav">' . $starter_prev . $starter_previous_label . '</p><p class="post-title">%title</p>',
)
);
?>
<!-- END post navigation -->
</div><!-- .wrap_single_post_content -->
<?php
// If comments are open load up the comment template.
if ( comments_open() ) {
require get_stylesheet_directory() . '/templates/comment/comment-section.php';
}
?>
</div><!-- .content_wrapper -->
<?php endwhile; ?>
<?php
get_footer();