-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
63 lines (60 loc) · 2.17 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
<?php get_header(); ?>
<section class="mnpk-post">
<div class="container">
<?php
if (have_posts()) :
while (have_posts()) : the_post();
?>
<article>
<div class="post-header">
<div class="titlebox">
<h1><?php the_title(); ?></h1>
<div class="timebox">
<time datetime="<?php the_time('Y-m-d'); ?>" itemprop="datepublished">
<?php the_time('Y/m/d'); ?>
</time>
</div>
</div>
<figure>
<?php
if (has_post_thumbnail()) :
the_post_thumbnail();
else:
echo '<img src="' . mnpk_get_default_image() . '" alt="まんぷく杯イメージ画像">';
endif;
?>
</figure>
</div>
<div class="tagbox">
<?php
$categories = get_the_category();
if (0 != count($categories)) :
?>
<ul>
<?php
$separator = ' ';
$output = '';
if ( $categories ) :
foreach( $categories as $category ) {
$output .= '<li class="' . $category->slug . '"><span>' . $category->cat_name . '</span></li>' . $separator;
}
echo trim( $output, $separator );
endif;
?>
</ul>
<?php
endif;
?>
</div>
<div class="content">
<?php the_content(); ?>
</div>
</article>
<?php
endwhile;
endif;
?>
</div>
</section>
<?php get_template_part('news-list-three'); ?>
<?php get_footer(); ?>