-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-home.php
executable file
·49 lines (46 loc) · 1010 Bytes
/
content-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
<?php
/**
* Template Name: Destaques
*
* @package Odin
* @since 2.2.0
*/
get_header();
?>
<div class="banner">
<!-- CAREROCEL HOME -->
<ul class="bxslider">
<?php
$loopdestaques = array(
'post_type' => 'destaque',
'order' => 'ASC',
);
$loopdestaques = new WP_Query( $loopdestaques );
if ($loopdestaques->have_posts()) :
while ( $loopdestaques->have_posts() ) : $loopdestaques->the_post();
$pegaBg = wp_get_attachment_url(get_post_thumbnail_id());
$content = get_the_content();
?>
<li style="background-image: url(<?php echo $pegaBg ;?>);">
<?php if( ! empty( $content ) ) { ?>
<div class="container">
<div class="infos_box">
<?php
the_title('<h1>', '</h1>');
the_content();
?>
</div>
</div>
<?php } ?>
<img src="<?php echo $pegaBg ;?>" title="<?php echo get_the_title() ?>" />
</li>
<?php
endwhile;
endif;
wp_reset_query();
?>
</ul>
<!-- / CAREROCEL HOME -->
</div>
<?php
get_footer();