-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
62 lines (60 loc) · 2.2 KB
/
index.php
File metadata and controls
62 lines (60 loc) · 2.2 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
<?php // Exit if accessed directly
if (!defined('ABSPATH')) {echo '<h1>Forbidden</h1>'; exit();} get_header(); ?>
<?php global $fi_print_options;
$single_layout=$fi_print_options['single_blog'];
if($single_layout=='fullwidth'):?>
<section class="on-blog-grid">
<div class="container">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="blog-item col-md-12">
<?php get_template_part('partials/article'); ?>
</div>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages>1) : ?>
<div class="blog-pagination">
<?php fi_print_pagination(); ?>
</div>
<?php endif; ?>
<?php else : ?>
<?php get_template_part('partials/nothing-found'); ?>
<?php endif; ?>
</div>
</section>
<?php else:
if($single_layout=='left'):
$sidebar='left';
$content='right';
else:
$sidebar='right';
$content='left';
endif;?>
<section class="on-blog">
<div class="container">
<div class="pull-<?php echo esc_attr($content);?> col-md-8">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="blog-posts">
<?php get_template_part('partials/article'); ?>
</div>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages>1) : ?>
<div class="blog-pagination">
<?php fi_print_pagination(); ?>
</div>
<?php endif; ?>
<?php else : ?>
<?php get_template_part('partials/nothing-found'); ?>
<?php endif; ?>
</div>
<?php if ( is_active_sidebar( 'fi_print-widgets-aside-right' ) ) { ?>
<div class="pull-<?php echo esc_attr($sidebar);?> col-md-4">
<div class="side-bar-widget">
<?php dynamic_sidebar( 'fi_print-widgets-aside-right' ); ?>
</div>
</div>
<?php } ?>
</div>
</section>
<?php endif;?>
<?php get_footer(); ?>