-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
79 lines (74 loc) · 3.34 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
<?php
/**
* Blog Page Template
*
* @package Tomato
* @author ThemeSuared
* @link http://themesuared.com/tomato/
*/
get_header();
spyropress_before_main_container();
get_template_part( 'templates/page', 'breadcrumb' ); //Include Page Breadcrumb Html.
$spyropress_position = get_setting( 'blog_single_sidebar_position', 'right' );
?>
<div class="blog-content">
<div class="container">
<div class="row">
<?php
if( is_active_sidebar( 'primary' ) ):
if( 'left' == $spyropress_position ) :
?>
<aside class="col-md-3">
<?php dynamic_sidebar( 'primary' ); ?>
</aside>
<?php
endif;
endif;
?>
<div class="col-md-9">
<?php
spyropress_before_loop();
if( have_posts() ) {
while( have_posts() ) {
the_post();
spyropress_before_post();
get_template_part( 'templates/blog/formats/content', get_post_format() );
spyropress_after_post();
}
//Single Navigation Link.
$spyropress_defaults = array(
'before' => '<nav><ul class="pager"><li>',
'after' => '</li></ul></nav>',
'link_before' => '',
'link_after' => '',
'next_or_number' => 'number',
'separator' => '</li><li>',
'nextpagelink' => esc_html__( 'Next page', 'tomato' ),
'previouspagelink' => esc_html__( 'Previous page', 'tomato' ),
'pagelink' => '%',
'echo' => 1
);
wp_link_pages( $spyropress_defaults );
}else{
echo '<h3>'.esc_html__( 'Sorry No Post Where Found', 'tomato' ).'</h3>';
}
spyropress_after_loop();
?>
</div>
<?php
if( is_active_sidebar( 'primary' ) ):
if( 'right' == $spyropress_position ) :
?>
<aside class="col-md-3">
<?php dynamic_sidebar( 'primary' ); ?>
</aside>
<?php
endif;
endif;
?>
</div>
</div>
</div>
<?php
spyropress_after_main_container();
get_footer();