-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-janelas.php
85 lines (70 loc) · 1.71 KB
/
page-janelas.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
<?php
/**
* Template Name: Janelas
*
*
*
*/
get_header();
get_sidebar();
$odin_general_opts = get_option( 'config' );
$imagem = $odin_general_opts['bgimg'];
$imagem = wp_get_attachment_image_src( $imagem, 'full' );
$obj = get_post_type_object( 'janelas' );
?>
<div id="primary" style="background-image:url('<?php echo $imagem[0]; ?>');" class="col-sm-9">
<div id="margem"></div>
<div id="content" class="site-content" role="main">
<div class="clearfix"></div>
<h1 id="titulo-cpt" class="entry-header">
<?php echo $obj->name;?>
</h1>
<div class="col-sm-1"></div>
<div id="descricao" class="col-sm-10">
<p><?php echo $obj->description;?></p>
</div>
<div class="clearfix"></div>
<div class="col-sm-1"></div>
<?php
$args = array(
'post_type' => 'janelas',
'posts_per_page' => 999,
'orderby'=> 'title',
'order' => 'ASC',
'paged' => true
);
$janelas_query = new WP_Query( $args );
// The Loop
if ( $janelas_query->have_posts() ) {
echo '<ul class="sem-margem col-sm-10"> ';
$count=1;
while ( $janelas_query->have_posts() ) {
$janelas_query->the_post();
$titu = get_the_title();
$desc = get_the_content();
?>
<li class='janela col-sm-4 ' id="cliente-<?php echo $post->ID;?>">
<a href="<?php the_permalink();?>">
<?php
the_post_thumbnail();
echo '<h4>'.$titu.'</h4>';
?>
</a>
</li>
<?php
if ($count % 3 == 0){
?>
<div class="clearfix"></div>
<?php
}
$count++;
}//while
echo '</ul>';
} else {
// no posts found
}
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_footer();