-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
87 lines (58 loc) · 3.09 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
85
86
87
<?php get_header(); ?>
<div id="main">
<div class="blog_search_header">
<div class="center">
<?php get_template_part('bloghead');?>
</div>
</div>
<div class="center">
<div id="bcont">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
<?php get_template_part('blogdets');?>
<div class="content_wrap">
<div class="content">
<?php the_content();?>
<?php wp_link_pages('before=<div class="p_navigation"> Pages &after=</div>'); ?>
<div class="clear"></div>
<div id="post_nav">
<?php if( is_attachment() ) : ?>
<div id="pn_next" class="pn">
<?php next_image_link(); ?>
</div>
<div id="pn_prev" class="pn">
<?php previous_image_link(); ?>
</div>
<?php else : ?>
<?php
$prev_post = get_adjacent_post(false, '', true);
$next_post = get_adjacent_post(false, '', false);
?>
<p id="pn_next" class="pn">
<?php if ($next_post) : $next_post_url = get_permalink($next_post->ID); $next_post_title = $next_post->post_title; ?>
<?php echo $next_post_title; ?> <img src="<?php echo esc_url(get_template_directory_uri().'/images/arrow-right.svg'); ?>" alt="arrow-right" /><br/>
<a class="post-next" href="<?php echo $next_post_url; ?>"><span>Next post </span></a>
<?php endif; ?>
</p>
<p id="pn_prev" class="pn">
<?php if ($prev_post) : $prev_post_url = get_permalink($prev_post->ID); $prev_post_title = $prev_post->post_title; ?>
<img src="<?php echo esc_url(get_template_directory_uri().'/images/arrow-left.svg'); ?>" alt="arrow-left" /> <?php echo $prev_post_title; ?><br/>
<a class="post-prev" href="<?php echo $prev_post_url; ?>"><span>Previous post</span></a>
<?php endif; ?>
</p>
<?php endif; ?>
<div id="mline"></div>
</div>
<div class="clear"></div>
<div id="comments">
<?php comments_template(); ?>
</div>
</div>
</div>
<div class="clear"></div>
</article>
<?php endwhile; ?>
</div>
</div>
</div>
<?php get_footer(); ?>