This repository has been archived by the owner on Mar 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathhome.php
147 lines (121 loc) · 4.62 KB
/
home.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?php get_header(); ?>
<?php
$stickies = get_option('sticky_posts');
rsort($stickies);
$slideshow_cat = arras_get_option('slideshow_cat');
$featured1_cat = arras_get_option('featured1_cat');
$featured2_cat = arras_get_option('featured2_cat');
$news_cat = arras_get_option('news_cat');
$slideshow_count = (int)arras_get_option('slideshow_count');
$featured1_count = (int)arras_get_option('featured1_count');
$featured2_count = (int)arras_get_option('featured2_count');
$post_blacklist = array();
?>
<div id="content" class="section">
<?php arras_above_content() ?>
<?php if (!$paged) : ?>
<?php if ( $featured1_cat !== '' && arras_get_option('enable_featured1') ) : ?>
<?php arras_above_index_featured1_post() ?>
<!-- Featured Articles #1 -->
<div id="index-featured1">
<?php if ( arras_get_option('featured1_title') != '' ) : ?>
<div class="home-title"><?php _e( arras_get_option('featured1_title'), 'arras' ) ?></div>
<?php endif;
arras_featured_loop( arras_get_option('featured1_display'), apply_filters('arras_featured1_query', array(
'list' => $featured1_cat,
'taxonomy' => arras_get_option('featured1_tax'),
'query' => array(
'posts_per_page' => $featured1_count,
'exclude' => $post_blacklist,
'post_type' => arras_get_option('featured1_posttype')
)
) ) );
?>
</div><!-- #index-featured1 -->
<?php endif ?>
<?php if ( $featured2_cat !== '' && arras_get_option('enable_featured2') ) : ?>
<?php arras_above_index_featured2_post() ?>
<!-- Featured Articles #2 -->
<div id="index-featured2">
<?php if ( arras_get_option('featured2_title') != '' ) : ?>
<div class="home-title"><?php _e( arras_get_option('featured2_title'), 'arras' ) ?></div>
<?php endif;
arras_featured_loop( arras_get_option('featured2_display'), apply_filters('arras_featured2_query', array(
'list' => $featured2_cat,
'taxonomy' => arras_get_option('featured2_tax'),
'query' => array(
'posts_per_page' => $featured2_count,
'exclude' => $post_blacklist,
'post_type' => arras_get_option('featured2_posttype')
)
) ) );
?>
</div><!-- #index-featured2 -->
<?php endif; ?>
<?php if ( arras_get_option('enable_news') ) : ?>
<?php arras_above_index_news_post() ?>
<!-- News Articles -->
<div id="index-news">
<?php if ( arras_get_option('news_title') != '' ) : ?>
<div class="home-title"><?php _e( arras_get_option('news_title') ) ?></div>
<?php endif ?>
<?php
$news_query_args = apply_filters('arras_news_query', array(
'list' => $news_cat,
'taxonomy' => arras_get_option('news_tax'),
'query' => array(
'posts_per_page' => arras_get_option('index_count'),
'exclude' => $post_blacklist,
'post_type' => arras_get_option('news_posttype'),
'paged' => $paged
)
) );
$news_query = arras_prep_query($news_query_args);
query_posts($news_query);
arras_featured_loop( arras_get_option('news_display'), $news_query_args, true );
if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
<div class="navigation clearfix">
<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
</div>
<?php } ?>
</div><!-- #index-news -->
<?php arras_below_index_news_post() ?>
<?php endif; ?>
<?php $sidebars = wp_get_sidebars_widgets(); ?>
<div id="bottom-content-1">
<?php if ( isset($sidebars['sidebar-4']) ) : ?>
<ul class="clearfix xoxo">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #1') ) : ?>
<li></li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
<div id="bottom-content-2">
<?php if ( isset($sidebars['sidebar-5']) ) : ?>
<ul class="clearfix xoxo">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
<li></li>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
<?php else: ?>
<?php if ( arras_get_option('news_title') != '' ) : ?>
<div class="home-title"><?php _e( arras_get_option('news_title') ) ?></div>
<?php endif ?>
<div id="archive-posts">
<?php arras_render_posts(null, arras_get_option('archive_display')) ?>
<?php if(function_exists('wp_pagenavi')) wp_pagenavi(); else { ?>
<div class="navigation clearfix">
<div class="floatleft"><?php next_posts_link( __('Older Entries', 'arras') ) ?></div>
<div class="floatright"><?php previous_posts_link( __('Newer Entries', 'arras') ) ?></div>
</div>
<?php } ?>
</div><!-- #archive-posts -->
<?php endif; ?>
<?php arras_below_content() ?>
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>