-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsingle.php
52 lines (42 loc) · 2.06 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
<?php get_header(); ?>
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="content-wrapper">
<div class="container">
<p class="post-meta"><?php the_date(" j F Y") ?></p>
<h1 class="page-title"><?php the_title(); ?></h1>
<div class="layout-sidebar-right">
<article class="layout-sidebar-right__main-content">
<div class="content-area content-area--post">
<?php the_content(); ?>
</div>
<nav class="guide-navigation">
<ul class="guide-navigation__list">
<?php if(get_previous_post()): ?>
<li class="guide-navigation__item guide-navigation__item--previous">
<a class="guide-navigation__link" href="<?php echo get_the_permalink(get_previous_post()); ?>">
<span>Previous post</span>
<span><?php echo get_previous_post()->post_title; ?></span>
</a>
</li>
<?php endif; ?>
<?php if(get_next_post()): ?>
<li class="guide-navigation__item guide-navigation__item--next">
<a class="guide-navigation__link" href="<?php echo get_the_permalink(get_next_post()); ?>">
<span>Next post</span>
<span><?php echo get_next_post()->post_title; ?></span>
</a>
</li>
<?php endif; ?>
</ul>
</nav>
</article>
<aside class="layout-sidebar-right__sidebar">
<?php if ( is_active_sidebar( "post_sidebar" ) ) : ?>
<?php dynamic_sidebar( "post_sidebar" ); ?>
<?php endif; ?>
</aside>
</div>
</div>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>