-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
38 lines (34 loc) · 1.12 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
<?php get_header(); ?>
<div class="container pt-36">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="">
<article id="post-<?php the_ID(); ?>" class="">
<?php if (get_field("show_title")) : ?>
<header class="mb-4 entry-header">
<?php the_title(sprintf('<h1 class="mb-4 text-2xl font-extrabold leading-tight entry-title lg:text-5xl"><a href="%s" rel="bookmark" class="no-underline">', esc_url(get_permalink())), '</a></h1>'); ?>
<div class="flex gap-3">
<time datetime="<?php echo get_the_date('c'); ?>" itemprop="datePublished" class="text-sm text-gray-700"><?php echo get_the_date(); ?></time>
<?php
// list posts tags
$tags = get_the_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<div class="text-sm text-gray-700">#' . $tag->name . '</div>';
}
}
?>
</div>
</header>
<?php endif; ?>
<div class="entry-content">
<?php the_content(); ?>
</div>
</article>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<?php
get_footer();