-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
64 lines (52 loc) · 1.3 KB
/
Copy pathsingle.php
File metadata and controls
64 lines (52 loc) · 1.3 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
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package fspo_theme
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post()
?>
<?php
if (has_post_thumbnail()) { ?>
<div class="thumbnail-post" style="background-image: url(<?php echo the_post_thumbnail_url( 'full' ); ?>);">
<div class="container title">
<h1><?php echo get_the_title(); ?></h1>
</div>
</div>
<?php } else { ?>
<div class="thumbnail-post post-bg" style="background-image: url('<?
echo get_template_directory_uri() . '/img/post-bg.jpg'
?>');">
<div class="container title">
<h1><?php echo get_the_title(); ?></h1>
</div>
</div>
<?php
}
?>
<div class="container">
<div class="row">
<section class="single col-md-9">
<?php the_time( 'j F Y' ); ?>
<?php the_content(); ?>
<?php
endwhile;
?>
</section>
<section class="col-md-3">
<? get_sidebar( 'sidebar-1' ) ?>
</section>
</div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();