Project

General

Profile

Bug #4476 » index.php

Boone Gorges, 2015-08-24 01:24 PM

 
1
<?php get_header() ?>
2
	
3
	<?php
4
			
5
		// ottengo il numero di pagina
6
		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
7
			
8
	?>
9
	<?php if($paged==1 and $iw_opt['slider_enable']) : ?>
10
		<?php get_template_part('part', 'slider'); ?>
11
	<?php endif; ?>
12
	
13
	<?php if($paged==1 and $iw_opt['chess_enable']) : ?>
14

    
15
		<?php 
16
		
17
		if( $iw_opt['chess-ver'] == 1){
18
			get_template_part('part', 'chess');
19
		} elseif( $iw_opt['chess-ver'] == 2){
20
			get_template_part('part', 'chess2');
21
		} elseif( $iw_opt['chess-ver'] == 3){
22
			get_template_part('part', 'chess3');
23
		} else{
24
			get_template_part('part', 'chess');
25
		}
26
		?>
27
	<?php endif; ?>
28

    
29
	<section id="featured" class="container">
30
		<div class="wrapper">
31
			<div class="row">
32
				<div class="col-lg-12 col-sm-12">
33
					<?php if($paged==1 and $iw_opt['showfeatured']) : ?>
34
						<div class="wrapper featured-articles">
35
						
36
							<h2><span><?php echo($iw_opt['titlefeatured']) ?></span></h2>
37
							
38
							<div class="row">
39
							
40
							<?php get_template_part('part', 'featured') ?>
41
							
42
							</div>
43
							
44
						</div>
45
					<?php endif; ?>
46
				</div>
47
			</div>
48
		</div>
49
	</section>
50
	
51
	<section id="content" class="container">
52
		<div class="wrapper">
53
		
54
			<div class="row">
55
				<div id="main" class="col-lg-8 col-sm-8">
56
					
57
					<div id="articlelist">
58
						<?php
59
						
60
							/*
61
						
62
							standard article list
63
						
64
							*/
65
							
66
							if ( isset($iw_opt['catchess']) and $iw_opt['catchess'] != '' and $iw_opt['chess_enable'] == '1'){
67
								$remove_catchess = $iw_opt['catchess'];
68
							}
69

    
70
							if ( isset($iw_opt['slider_cat']) and $iw_opt['slider_cat'] != '' and $iw_opt['slider_enable'] == '1'){
71
								$remove_catslider = $iw_opt['slider_cat'];
72
							}
73

    
74
							if ( isset($iw_opt['catfeatured']) and $iw_opt['catfeatured'] != ''){
75
								$remove_catfeatured = $iw_opt['catfeatured'];
76
							}
77

    
78
							if ( empty($remove_catchess) ) $remove_catchess = '1';
79
							if ( empty($remove_catslider) ) $remove_catslider = '1';
80
							if ( empty($remove_catfeatured) ) $remove_catfeatured = '1';
81
							
82
							$args = array(
83
								'paged' => $paged,
84
								//'ignore_sticky_posts' => 1,
85
								'posts_per_page' => get_option('posts_per_page'),
86
								'cat'	=> 10//-$remove_catchess.','.-$remove_catfeatured.','.-$remove_catslider,
87
							);
88
									
89
							$query = new WP_Query( $args );
90
						
91
						if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
92
						
93
								get_template_part('loop', 'archive');
94
							
95
							endwhile;
96
						
97
						?>
98
						
99
						<?php if(function_exists('wp_pagenavi')) : ?>
100
							<div class="iw-navigation">
101
								<?php wp_pagenavi( array( 'query' => $query )); ?>
102
				            </div>
103
						<?php else : ?>
104

    
105
						<div class="row">
106
							<div class="col-xs-6">
107
								<?php next_posts_link( '<span class="fa-stack fa-lg">
108
								  <i class="fa fa-circle fa-stack-2x"></i>
109
								  <i class="fa fa-long-arrow-left fa-stack-1x fa-inverse"></i>
110
								</span>' ); ?>
111
							</div>
112
							<div class="col-xs-6 text-right">
113
								<?php previous_posts_link( '<span class="fa-stack fa-lg">
114
								  <i class="fa fa-circle fa-stack-2x"></i>
115
								  <i class="fa fa-long-arrow-right fa-stack-1x fa-inverse"></i>
116
								</span>' ); ?>
117
							</div>
118
						</div>
119

    
120
						<?php endif; ?>
121

    
122
						<?php else:  ?>
123
						  <p><?php _e( 'Last articles: You have to make other articles to show here', 'roma' ); ?></p>
124
						<?php endif; ?>
125

    
126
						<?php
127
								
128
							wp_reset_postdata();
129
								
130
						?>
131
					
132
					</div>
133
					
134
				</div> <!-- ./main -->
135
			
136
				<aside class="col-lg-4 col-sm-4">
137
					<div class="asidefix">
138
						<?php get_sidebar() ?>
139
					</div>
140
				</aside>	
141
			</div> <!-- /row featured -->
142
			
143
		</div>
144
	</section>
145
	
146
<?php get_footer() ?>
    (1-1/1)