File: /var/www/html/wpprotonperinggit/wp-content/themes/voiture/widgets/listing-list.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
extract( $args );
extract( $args );
extract( $instance );
$title = apply_filters('widget_title', $instance['title']);
$style = !empty($style) ? $style : 'carousel';
$args = array(
'limit' => $number_post,
'get_listings_by' => $get_listings_by,
'orderby' => $orderby,
'order' => $order,
'style' => $style,
);
$loop = voiture_get_listings($args);
if ( $loop->have_posts() ):
echo trim($before_widget);
if ( $title ) {
echo trim($before_title) . trim( $title ) . $after_title;
}
?>
<?php if($style == 'list'){ ?>
<div class="listings-list-simple">
<?php while ( $loop->have_posts() ): $loop->the_post(); ?>
<?php get_template_part( 'template-listings/listings-styles/inner', 'list-simple'); ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
<?php }else{ ?>
<div class="listings-sidebar">
<div class="slick-carousel" data-carousel="slick" data-items="1" data-smallmedium="1" data-extrasmall="1" data-pagination="true" data-nav="false">
<?php while ( $loop->have_posts() ): $loop->the_post(); ?>
<div class="item">
<?php get_template_part( 'template-listings/listings-styles/inner', 'grid-simple'); ?>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata(); ?>
</div>
<?php }
echo trim($after_widget);
endif;