This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
84 lines (78 loc) · 2.19 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
76
77
78
79
80
81
82
83
84
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package Cooper
*/
get_header();
?>
<?php
while (have_posts()) :
the_post();
?>
<div class="container">
<div class="row justify-content-center">
<?php if ( has_post_format('image') ) { ?>
<article class="col-md-6 h-entry">
<div class="bg-white p-3 mb-3 row">
<header div class="col-12 order-last">
<h1 class="h5 pt-3 mb-0 text-dark p-name"><?php the_title(); ?></h1>
<p class="text-muted" class="dt-published"><?php the_date(); ?></p>
</header>
<main class="col-12 u-photo order-first">
<?php the_content(); ?>
</main>
</div>
<footer>
<p class="text-muted p-category">
<?php the_tags();
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__('Pages:', 'cooper'),
'after' => '</div>',
)
);
?>
</p>
</footer>
</article>
<?php } else { ?>
<div class="col-md-8">
<main id="primary" class="site-main">
<article class="h-entry">
<header>
<h1 class="entry-title py-5 p-name"><?php the_title(); ?></h1>
<p class="text-muted font-monospace"><?php echo get_post_kind_slug(); ?> posted <time class="dt-published" datetime="<?php the_time( 'c' ); ?>"><?php the_date(); ?></time> by <a rel="author" class="p-author h-card" href="https://marksuth.dev">Mark Sutherland</a> </p>
</header>
<main class="e-content">
<?php the_content(); ?>
</main>
<footer>
<p class="text-muted p-category">
<?php the_tags();
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__('Pages:', 'cooper'),
'after' => '</div>',
)
);
?>
</p>
<p class="font-monospace small text-muted">
Permalink: <a class="u-url" href="<?php echo wp_get_shortlink(); ?>"><?php echo wp_get_shortlink(); ?></a>
</footer>
</article>
<hr>
<?php
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</main>
</div>
<?php }; endwhile; ?>
</div>
</div>
<?php get_footer(); ?>