File "slider-category.php"
Full Path: /home/ozbarhaber/public_html/19052025___siteeee/wp-content/themes/anka/parts/slider-category.php
File size: 2 KB
MIME-type: text/x-php
Charset: utf-8
<?php if(!defined('ABSPATH')) exit; ?>
<div class="sliderWidget safirWidget catSlider <?php if(xoption("showCatSliderShadow")) echo "showShadow" ?> fullslider color<?php echo get_query_var("cat") ?> bottomMargin">
<?php
$queryargs = array(
"cat" => get_query_var("cat"),
"posts_per_page" => xoption("catSliderNumber"),
"post_status" => "publish",
"no_found_rows" => true,
"ignore_sticky_posts" => true,
);
$results = new WP_Query($queryargs);
if( $results->have_posts() ) {
$counter = 0;
?>
<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() ) {
$counter++;
$results->the_post();
?>
<div class="item post">
<div class="postthumb">
<a href="<?php the_permalink() ?>">
<?php
if($x = get_post_meta(get_the_ID(), "sliderImage", true)) {
?>
<div class="safirthumb">
<div class="center">
<img <?php safirLazyThumb($x) ?> width="825" height="450" alt="<?php the_title() ?>" />
</div>
</div>
<?php
} else {
safirthumb();
}
?>
</a>
</div>
<?php if(xoption("showCatSliderInfo")) : ?>
<div class="detail">
<div class="title">
<a href=<?php the_permalink() ?>><?php the_title() ?></a>
</div>
<?php safirMetas(xoption("catSliderMetas")) ?>
</div>
<?php endif; ?>
</div>
<?php
}
?>
</div>
</div>
<?php
wp_reset_postdata();
}
?>
</div>
</div>
<?php
}
?>
<style>
<?php
$sliderRatio = 100 * xoption("catSliderHeight") / 825;
?>
.catSlider .slider .safirthumb {
padding-bottom: <?php echo $sliderRatio ?>%;
}
</style>
</div>