PluginProbe
WP Directory Kit / 1.1.8
WP Directory Kit v1.1.8
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / elementor-elements / views / wdk-listing-agents-listings.php

wdk-listing-agents-listings.php in WP Directory Kit 1.1.8, at elementor-elements/views/wdk-listing-agents-listings.php

94 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Element Listing Similar Listings.
4 * This is the template that elementor element listings, results, grid, list
5 *
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 ?>
13 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
14 <div class="wdk-listings-results <?php echo wmvc_show_data('styles_thmbn_des_type',$settings, '');?> view-<?php echo wmvc_show_data('layout_type',$settings, '');?>">
15 <?php if(count($results) > 0):?>
16 <?php if($settings['layout_type'] == 'carousel'):?>
17 <div class="wdk_results_listings_slider_box <?php echo esc_attr($settings['layout_carousel_animation_style']).'_animation';?> <?php echo join(' ', [$settings['styles_carousel_dots_position_style'],$settings['styles_carousel_arrows_position']]);?>">
18 <div class="wdk_results_listings_slider_body">
19 <div class="wdk_results_listings_slider_ini">
20 <?php else:?>
21 <div class="wdk-row">
22 <?php endif;?>
23 <?php foreach($results as $listing):?>
24 <div class="wdk-col">
25 <?php echo wdk_listing_card($listing, $settings);?>
26 </div>
27 <?php endforeach;?>
28 <?php if($settings['layout_type'] == 'carousel'):?>
29 </div>
30 <div class="wdk_slider_arrows">
31 <a class="wdk-slider-prev wdk_lr_slider_arrow">
32 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_left'], [ 'aria-hidden' => 'true' ] ); ?>
33 </a>
34 <a class="wdk-slider-next wdk_lr_slider_arrow">
35 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_right'], [ 'aria-hidden' => 'true' ] ); ?>
36 </a>
37 </div>
38 </div>
39 </div>
40 <?php else:?>
41 </div>
42 <?php endif;?>
43 <?php else:?>
44 <p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('Similar listings not found', 'wpdirectorykit');?></p>
45 <?php endif;?>
46 </div>
47 <?php if($settings['layout_type'] == 'carousel'):?>
48 <script>
49 jQuery(document).ready(function($){
50 $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_results_listings_slider_ini').slick({
51 <?php if(!empty($results) && wmvc_show_data('layout_carousel_columns', $settings,1) < wmvc_count($results)):?>
52 dots: true,
53 arrows: true,
54 <?php else:?>
55 dots: false,
56 arrows: false,
57 <?php endif;?>
58 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns', $settings, '3')))) ? wmvc_show_data('layout_carousel_columns', $settings, '3') : 3;?>,
59 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns', $settings, '3')))) ? wmvc_show_data('layout_carousel_columns', $settings, '3') : 3;?>,
60 <?php if(!empty(wmvc_show_data('layout_carousel_is_infinite', $settings))):?>
61 infinite: <?php echo wmvc_show_data('layout_carousel_is_infinite', $settings, 'true');?>,
62 <?php endif;?>
63 <?php if(!empty(wmvc_show_data('layout_carousel_is_autoplay', $settings))):?>
64 autoplay: <?php echo wmvc_show_data('layout_carousel_is_autoplay', $settings, 'false');?>,
65 <?php endif;?>
66 nextArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_slider_arrows .wdk-slider-next'),
67 prevArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_slider_arrows .wdk-slider-prev'),
68 customPaging: function(slider, i) {
69 // this example would render "tabs" with titles
70 return '<span class="wdk_lr_dot"><?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_dots_icon'], [ 'aria-hidden' => 'true' ] ); ?></span>';
71 },
72 responsive: [
73 {
74 breakpoint: 991,
75 settings: {
76 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_tablet', $settings, '2')))) ? wmvc_show_data('layout_carousel_columns_tablet', $settings, '2') : 2;?>,
77 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_tablet', $settings, '2')))) ? wmvc_show_data('layout_carousel_columns_tablet', $settings, '2') : 2;?>,
78 }
79 },
80 {
81 breakpoint: 768,
82 settings: {
83 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_mobile', $settings, '1')))) ? wmvc_show_data('layout_carousel_columns_mobile', $settings, '1') : 1;?>,
84 slidesToScroll: <?php echo (!empty(trim(wmvc_show_data('layout_carousel_columns_mobile', $settings, '1')))) ? wmvc_show_data('layout_carousel_columns_mobile', $settings, '1') : 1;?>,
85 }
86 },
87 ]
88 });
89 })
90 </script>
91 <?php endif;?>
92 </div>
93
94