| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template for Element Locations Grid. |
| 4 |
* This is the template that elementor element locations, grid |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
?> |
| 13 |
|
| 14 |
<?php |
| 15 |
$results_page = wmvc_show_data('conf_link', $settings); |
| 16 |
if(!is_array($results_page) && !empty($results_page)) { |
| 17 |
$results_page = get_permalink($results_page); |
| 18 |
} else { |
| 19 |
$results_page = get_permalink(wdk_get_option('wdk_results_page')); |
| 20 |
} |
| 21 |
?> |
| 22 |
|
| 23 |
<div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>"> |
| 24 |
<div class="wdk-locations-grid"> |
| 25 |
<div class="wdk-row"> |
| 26 |
<?php if(count($results) > 0):?> |
| 27 |
<?php foreach ($results as $key => $value):?> |
| 28 |
<div class="wdk-col"> |
| 29 |
<div class="wdk-locations-card"> |
| 30 |
<div class="wdk-thumbnail"> |
| 31 |
<?php if(wmvc_show_data('layout_image_type', $settings) == 'icon'):?> |
| 32 |
<img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'icon_id', 'icon_path'));?>" alt="<?php echo wmvc_show_data('location_title', $value);?>" class="wdk-icon"> |
| 33 |
<?php else:?> |
| 34 |
<img src="<?php echo esc_url(wdk_image_src($value, 'full',NULL,'image_id', 'image_path'));?>" alt="<?php echo wmvc_show_data('location_title', $value);?>" class="wdk-image"> |
| 35 |
<?php endif;?> |
| 36 |
</div> |
| 37 |
<h3 class="wdk-title"><?php echo wmvc_show_data('location_title', $value);?></h3> |
| 38 |
<a href="<?php echo esc_url(wdk_url_suffix($results_page,'search_location='.wmvc_show_data('idlocation', $value)));?>#results" class="wdk-link"></a> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<?php endforeach;?> |
| 42 |
<?php else:?> |
| 43 |
<div class="wdk-col wdk-col-full wdk-col-full-always"> |
| 44 |
<p class="wdk_alert wdk_alert-danger"><?php echo esc_html__('Locations not found', 'wpdirectorykit');?></p> |
| 45 |
</div> |
| 46 |
<?php endif;?> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
|
| 51 |
|