-
Notifications
You must be signed in to change notification settings - Fork 0
/
carousel.php
56 lines (41 loc) · 1.31 KB
/
carousel.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
<?php global $redux_demo; ?>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li class="" data-target="#myCarousel" data-slide-to="1"></li>
<li class="" data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<?php
$i=1;
$slide = $redux_demo['front-slider'];
foreach ($slide as $slideimage){
if($i == 1){
echo '<div class="active item" style="background-image:url('.$slideimage['image'].');">
<div class="carousel-caption">
<h4>'.$slideimage['title'].'</h4>
<p>'.$slideimage['description'].'</p>
</div>
</div>';
}
else {
echo '<div class="item" style="background-image:url('.$slideimage['image'].');">
<div class="carousel-caption">
<h4>'.$slideimage['title'].'</h4>
<p>'.$slideimage['description'].'</p>
</div>
</div>';
}
$i++;
}
?>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="icon-prev">
</span>
</a>
<a class="right carousel-control " href="#myCarousel" data-slide="next">
<span class="icon-next">
</span>
</a>
</div>
</div>