-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-jardins.php
88 lines (72 loc) · 1.72 KB
/
archive-jardins.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
<?php
/**
* Template Name: Meu Jardim
*
*
*
*/
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( 'jardins' );
?>
<div id="primary" class="col-sm-10">
<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->labels->singular_name;
// 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="clearfix"></div>
<div class="col-sm-1"></div>
<?php
$args = array(
'post_type' => 'jardins',
'posts_per_page' => 9999,
'paged' => false
);
$jardim_query = new WP_Query( $args );
// The Loop
if ( $jardim_query->have_posts() ) {
echo '<ul id="conteudo-filtro" class="sem-margem col-sm-10"> ';
$count=1;
while ( $jardim_query->have_posts() ) {
$jardim_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('janelas');
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();