forked from arnabwahid/wordpress-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
83 lines (55 loc) · 2.27 KB
/
index.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
<?php get_header(); ?>
<?php
global $wheniwasbad_options;
$hide_empty_sidebar = $wheniwasbad_options['hide_widgets'];
$show_blog_sidebar = $wheniwasbad_options['blog_sidebar'];
$sidebar_widget_group = $wheniwasbad_options['blog_sidebar_widgets'];
$sidebar_position = $wheniwasbad_options['blog_sidebar_position'];
if ( ! is_active_sidebar($sidebar_widget_group) && $hide_empty_sidebar) {
$main_class = "col-md-12";
$sidebar_class = "";
} else {
if ( $sidebar_position == 'left' ) {
$main_class = "col-md-9 col-md-push-3";
$sidebar_class = "col-md-3 col-md-pull-9";
} elseif ( $sidebar_position == 'right' ) {
$main_class = "col-md-9";
$sidebar_class = "col-md-3";
}
}
$blog_jumbotron = $wheniwasbad_options['blog_jumbotron'];
$jumbotron_content = $wheniwasbad_options['blog_jumbotron_content'];
?>
<?php if ( $blog_jumbotron && $jumbotron_content ) : ?>
<div class="jumbotron">
<?php echo $jumbotron_content; ?>
</div>
<?php endif; ?>
<div id="content" class="container clearfix">
<div class="row clearfix">
<section id="main" role="main" class="<?php echo $main_class; ?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; // end of the loop. ?>
<?php else : ?>
<?php not_found('index'); ?>
<?php endif; ?>
<?php if (function_exists('page_navi')) : // if expirimental feature is active ?>
<?php page_navi(); // use the page navi function ?>
<?php else : // if it is disabled, display regular wp prev & next links ?>
<nav class="wp-prev-next pagenavi">
<ul class="clearfix">
<li class="prev-link"><?php next_posts_link(_e('<i class="glyphicon glyphicon-chevron-sign-left"></i> Older Entries', "wheniwasbad")) ?></li>
<li class="next-link"><?php previous_posts_link(_e('Newer Entries <i class="glyphicon glyphicon-chevron-sign-right"></i>', "wheniwasbad")) ?></li>
</ul>
</nav>
<?php endif; ?>
</section> <!-- end #main -->
<?php if ($sidebar_class != ''): ?>
<section class="<?php echo $sidebar_class; ?> clearfix">
<?php get_sidebar($sidebar_widget_group); ?>
</section>
<?php endif; ?>
</div> <!-- row -->
</div> <!-- end #content -->
<?php get_footer(); ?>