-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
44 lines (41 loc) · 1.79 KB
/
single.php
File metadata and controls
44 lines (41 loc) · 1.79 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
<?php get_header();
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<div class="o-single">
<div class="o-single__hero">
<div class="o-row">
<div class="o-row-container o-single__head">
<h1 class="o-single__title"><?php the_title() ?></h1>
<div class="o-single__metadata">
<time class="o-single__metadata__item"><?php echo get_the_time( 'F jS, Y' ); ?></time>
<span class="o-single__metadata__divider">/</span>
<span class="o-single__metadata__item">
Less than <?php echo reading_time(); ?> minute read
</span>
</div>
</div>
</div>
<?php if (has_post_thumbnail()) :
$thumbnail_url = get_the_post_thumbnail_url($post->ID,'banner');
?>
<div style="background-image:url('<?php echo $thumbnail_url ?>')" class="o-single__featured-image"></div>
<?php endif; ?>
</div>
<div class="o-row">
<div class="o-row-container">
<div class="o-single__content">
<?php if(has_excerpt()) : ?>
<div class="o-single__tldr">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
<div class="o-content">
<?php the_content() ?>
</div>
</div>
</div>
</div>
</div>
<?php endwhile;
endif; ?>
<?php get_footer();