/
index.php
96 lines (69 loc) · 3.63 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
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php get_header(); ?>
<!-- body ----------------------------------------->
<section id="body">
<div class="container">
<div class="row">
<!-- links ---------------------------->
<section id="links" class="col-lg-2">
<?php get_sidebar('left'); ?>
</section>
<!-- conteudo ---------------------------->
<section id="conteudo" class="col-lg-7">
<div id="destaque" class="container-fluid">
<div class="row">
<div class="col-lg-12" >
<?php
$args = array('post_type'=>'post', 'tag'=>'destaque', 'numberposts'=>1);
$post_destaque = get_posts($args);
?>
<?php if($post_destaque) : foreach( $post_destaque as $post ) : setup_postdata( $post ); ?>
<?php if(has_post_thumbnail()): ?>
<?php the_post_thumbnail('', array('class'=>'img-responsive')); ?>
<?php endif; ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</div>
<div id="noticias" class="container-fluid">
<?php
$args = array('post_type'=>'post', 'tag'=>'evidencia', 'numberposts'=>5);
$post_evidencia = get_posts($args);
?>
<?php if($post_evidencia) : foreach( $post_evidencia as $post ) : setup_postdata( $post ); ?>
<div class="row">
<div class="col-lg-12" >
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<span><?php the_content(); ?></span>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
<div id="maisNoticias" class="container-fluid">
<h4><i class='fa fa-newspaper-o'></i> Mais notícias</h4>
<div class="list-group">
<?php
$args = array(
'posts_per_page'=>10,
'tag__not_in'=>array(4,5)
);
$post_noticia = new WP_Query($args);
//$post_noticia = get_posts($args);
?>
<?php if($post_noticia->have_posts()) : while( $post_noticia->have_posts()) : $post_noticia->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="list-group-item"><?php the_title(); ?></a>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</section>
<!-- banners ---------------------------->
<section id="banners" class="col-lg-3">
<?php get_sidebar('right'); ?>
</section>
</div>
</div>
</section>
<?php get_footer(); ?>