PluginProbe
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits / 3.1.9
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits v3.1.9
3.2.2 3.2.3 3.2.1 3.2.0 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.9 trunk 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.3 1.1.4 1.1.5 All 174 releases
master-addons / inc / views / post-templates / single-product-template.php

single-product-template.php in Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits 3.1.9, at inc/views/post-templates/single-product-template.php

71 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
2 <?php
3
4 use MasterAddons\Inc\Classes\Helper;
5
6 $args = array(
7 'post_type' => 'product',
8 'posts_per_page' => 1,
9 'post_status' => 'publish',
10 'page_id' => absint($prod_list)
11 );
12
13 $jltma_wc_wp_query = new WP_Query;
14
15 $jltma_wc_wp_query->query($args);
16
17 while ($jltma_wc_wp_query->have_posts()) {
18 $jltma_wc_wp_query->the_post();
19
20 $jltma_wc_alt_text = get_post_meta(get_post_thumbnail_id(get_the_ID()), '_wp_attachment_image_alt', true);
21 $excerpt = Helper::jltma_excerpt_truncate(get_the_excerpt(), esc_attr($excerpt_size), '...');
22
23 if (Helper::jltma_get_featured_image_url() !== false) {
24 $featured_image_src = aq_resize(esc_url(Helper::jltma_get_featured_image_url()), $image_width, $image_height, true, true, true);
25 } else {
26 $featured_image_src = WP_PLUGIN_URL . '/woocommerce/assets/images/placeholder.png';
27 }
28 ?>
29
30 <div class="jltma_wc_single_product_item">
31 <div class="jltma_wc_single_product_wrapper">
32 <?php
33 if ($image_status == 'yes') {
34 ?>
35 <div class="jltma_wc_prod_image_cont">
36 <img src="<?php echo esc_url($featured_image_src); ?>" alt="<?php echo esc_attr($jltma_wc_alt_text); ?>" />
37 </div>
38 <?php
39 }
40
41 if ($title_status == 'yes') {
42 ?>
43 <div class="jltma_wc_prod_title_cont">
44 <h3 class="jltma_wc_prod_title">
45 <a href="<?php echo (($title_link == 'yes') ? '' . esc_url(get_permalink()) . '' : 'javascript:void(0)'); ?>" class="<?php echo (($title_link == 'yes') ? '' : 'no_linked_title'); ?>">
46 <?php echo esc_html(get_the_title()); ?>
47 </a>
48 </h3>
49 </div>
50 <?php
51 }
52
53 if ($description_status == 'yes') {
54 ?>
55 <div class="jltma_wc_prod_description_cont">
56 <?php echo esc_html($excerpt); ?>
57 </div>
58 <?php
59 }
60 ?>
61
62 <div class="jltma_wc_price_cont jltma_wc_cart_button_<?php echo esc_attr($cart_button); ?>">
63 <?php echo do_shortcode('[add_to_cart id="' . get_the_ID() . '" style="border: none;"]') ?>
64 </div>
65 </div>
66 </div>
67 <?php
68 }
69
70 wp_reset_postdata();
71