File "wideslider.php"
Full Path: /home/ozbarhaber/public_html/wp-content/themes/anka/widgets/wideslider.php
File size: 1.7 KB
MIME-type: text/x-php
Charset: utf-8
<?php if(!defined('ABSPATH')) exit; ?>
<div id="<?php echo $this->id ?>" class="wideSlider safirWidget <?php echo "$color $widgetPlace"?>Widget">
<div class="innerContainer">
<div class="slider">
<?php
$results = new WP_Query($queryargs);
if( $results->have_posts() ) {
$counter = 0;
?>
<div class="items">
<div class="owl-carousel">
<?php
while( $results->have_posts() ) {
$results->the_post();
$counter++;
?>
<div class="item post" data-dot="<a href='<?php the_permalink(); ?>'><span><?php echo $counter;?></span></a>">
<div class="postthumb">
<a href="<?php the_permalink() ?>">
<?php
if($x = get_post_meta(get_the_ID(), "wideSliderImage", true)) {
?>
<div class="safirthumb">
<div class="center">
<img <?php safirLazyThumb($x) ?> width="1070" height="200" alt="<?php the_title() ?>" />
</div>
</div>
<?php
} else {
safirthumb();
}
?>
</a>
</div>
</div>
<?php
}
?>
</div>
</div>
<style>
<?php
if(!is_numeric($wideheight)) $wideheight = 200;
if($widgetPlace == "wide") {
$wideSliderRatio = 100 * $wideheight / 1070;
} else {
$wideSliderRatio = 100 * $wideheight / 825;
}
?>
#<?php echo $this->id ?> .safirthumb {
padding-bottom: <?php echo $wideSliderRatio ?>%;
}
#<?php echo $this->id ?> .owl-dot {
height: <?php echo 100/$counter ?>%;
}
</style>
<?php
wp_reset_postdata();
}
?>
</div>
</div>
</div>