-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
139 lines (99 loc) · 3.43 KB
/
single.php
File metadata and controls
139 lines (99 loc) · 3.43 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Shop_Petaluma
*/
get_header();
?>
<main id="primary" class="site-main">
<?php
while ( have_posts() ) :
the_post();
?>
<div class="title-section-wrapper">
<div class="title-container container">
<p class="content-type-name">Inspirational stories</p>
<p class="spet-subhead">the subhead</p>
</div>
</div>
<div class="category-bar-wrapper">
<div class="category-bar-container container">
<p class="category-name">Category name</p>
</div>
</div>
<div class="content-wrapper">
<div class="content-container container">
<h1><?php the_title(); ?></h1>
<p>maybe an excerpt here? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugit corrupti neque commodi fuga impedit officia sit magni ea eveniet ullam.</p>
<div class="featured-image-wrapper">
<?php the_post_thumbnail('large'); ?>
</div>
<?php the_content(); ?>
<?php
// get_template_part( 'template-parts/content', get_post_type() );
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'shop-petaluma' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'shop-petaluma' ) . '</span> <span class="nav-title">%title</span>',
)
);
// If comments are open or we have at least one comment, load up the comment template.
// if ( comments_open() || get_comments_number() ) :
// comments_template();
// endif;
?>
</div>
</div>
<div class="share-wrapper">
<div class="share-container container">
<span>SHARE</span>
<a href="https://facebook.com" target="_blank" rel="noreferrer">icon</a>
<a href="https://twitter.com" target="_blank" rel="noreferrer">icon</a>
<a href="https://instagram.com" target="_blank" rel="noreferrer">icon</a>
<a href="https://facebook.com" target="_blank" rel="noreferrer">icon</a>
</div>
</div>
<section class="related-section">
<div class="related-container container">
<h2>Related Articles</h2>
<p>Subhead</p>
<div class="row">
<?php
$spet_related_args = array(
'post_type' => 'post',
'order' => 'DESC',
'posts_per_page' => '6',
);
$spet_related = new WP_Query( $spet_related_args );
if ( $spet_related->have_posts() ) {
while ( $spet_related->have_posts() ) {
$spet_related->the_post();
?>
<div class="related-card col-md-4">
<div class="photo-wrapper">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('large'); ?>
</a>
</div>
<p class="related-name"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
</div>
<?php
} // endwhile for relateds
} else {
echo '<p>No related articles have been found.</p>';
};
wp_reset_postdata();
?>
</div>
</div>
</section>
<?php
endwhile; // End of the loop.
?>
</main><!-- #main -->
<?php
// get_sidebar();
get_footer();