PATH:
home
/
letacommog
/
aperobusiness
/
wp-content
/
themes
/
deep
/
inc
/
visualcomposer
/
shortcodes
<?php add_action( 'vc_before_init', 'deep_special_offers_get_id' ); function deep_special_offers_get_id() { $special_offers_product = array( 'post_type' => 'product', 'order' => 'ASC', 'posts_per_page' => '-1', ); $spo_query = new WP_Query( $special_offers_product ); $titles = array(); if ( $spo_query->have_posts() ) { $titles[] = array( '' => esc_html__( 'Please select a product', 'deep' ), ); while ( $spo_query->have_posts() ) { $spo_query->the_post(); $product_has_off = get_post_meta( get_the_id(), '_sale_price', true ); $sale_price_dates_from = get_post_meta( get_the_id(), '_sale_price_dates_from', true ); $sale_price_dates_to = get_post_meta( get_the_id(), '_sale_price_dates_to', true ); // Get the discount if ( $product_has_off != '' ) { $titles[] = get_the_title(); } } } wp_reset_postdata(); vc_map( array( 'name' => esc_html__( 'Special Offers', 'deep' ), 'base' => 'special_offers', 'description' => esc_html__( 'Special Offers', 'deep' ), 'icon' => 'webnus-special-offers', 'category' => esc_html__( 'Webnus Shortcodes', 'deep' ), 'params' => array( array( 'type' => 'dropdown', 'heading' => esc_html__( 'Select Product ', 'deep' ), 'param_name' => 'post_to_show', 'value' => $titles, ), array( 'type' => 'checkbox', 'heading' => esc_html__( 'Open link in a new tab? ', 'deep' ), 'description' => esc_html__( 'Add Target = _blank', 'deep'), 'param_name' => 'link_target', 'std' => 'false', ), // Class & ID array( 'group' => 'Class & ID', 'type' => 'textfield', 'heading' => esc_html__( 'Extra Class', 'deep' ), 'param_name' => 'shortcodeclass', 'value' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column paddingtop', ), array( 'group' => 'Class & ID', 'type' => 'textfield', 'heading' => esc_html__( 'ID', 'deep' ), 'param_name' => 'shortcodeid', 'value' => '', 'edit_field_class' => 'vc_col-sm-6 vc_column paddingtop', ), ) ) ); }
[+]
..
[-] 01-speakers.php
[edit]
[-] 01-slider.php
[edit]
[-] 01-singlecause.php
[edit]
[-] 06-ourclients.php
[edit]
[-] 04-latestblogs.php
[edit]
[-] 48-line.php
[edit]
[-] 03-collection.php
[edit]
[-] 16-teaserbox.php
[edit]
[-] 17-reservation.php
[edit]
[-] 01-special-offers.php
[edit]
[-] 46-alert.php
[edit]
[-] 57-gallery.php
[edit]
[-] 01-buy-process.php
[edit]
[-] 01-review-form.php
[edit]
[-] 55-vcw.php
[edit]
[-] 08-content-carousel.php
[edit]
[-] 16-login.php
[edit]
[-] 17-food-menu.php
[edit]
[-] 10-callout.php
[edit]
[-] 34-quote.php
[edit]
[-] 01-pricing-tables.php
[edit]
[-] 04-postfromblog.php
[edit]
[-] 01-sermon-category.php
[edit]
[-] 40-latest-tweets.php
[edit]
[-] 01-socials.php
[edit]
[-] 17-recipes.php
[edit]
[-] 01-pricing-plan.php
[edit]
[-] 01-domain-checker.php
[edit]
[-] 01-prayerwall-items.php
[edit]
[-] 21-service-carousel.php
[edit]
[-] 08-content-carousel-tab.php
[edit]
[-] 50-tabs.php
[edit]
[-] 30-googlemap.php
[edit]
[-] 19-process-carousel.php
[edit]
[-] 04-blog.php
[edit]
[-] 03-like-view-share.php
[edit]
[-] 01-sermons.php
[edit]
[-] 01-portfolio-carousel.php
[edit]
[-] 20-maxcounter.php
[edit]
[-] 45-dropcap.php
[edit]
[-] 25-list.php
[edit]
[-] 02-before-after-image.php
[edit]
[-] 01-causes.php
[edit]
[-] 04-magazine.php
[edit]
[-] 29-icondivider.php
[edit]
[-] 06-ourteam.php
[edit]
[-] 01-w-title.php
[edit]
[-] 08-testimonial-carousel.php
[edit]
[-] 07-button.php
[edit]
[-] 08-testimonial-single-tab.php
[edit]
[-] 08-testimonial.php
[edit]
[-] 52-tooltip.php
[edit]
[-] 08-testimonial-tab.php
[edit]
[-] 01-prayerwall-form.php
[edit]
[-] 07-donate.php
[edit]
[-] 12-video-teaser.php
[edit]
[-] 02-wp-hotel-booking.php
[edit]
[-] 01-singlesermon.php
[edit]
[-] 01-instagram.php
[edit]
[-] 04-postslider.php
[edit]
[-] 01-slider-item.php
[edit]
[-] 35-link.php
[edit]
[-] 34-block-quote.php
[edit]
[-] 51-row.php
[edit]
[-] 03-tablepress.php
[edit]
[-] 56-roadmap.php
[edit]
[-] 01-custom-menu.php
[edit]
[-] 01-w-svg.php
[edit]
[-] 11-infobox.php
[edit]
[-] 01-shop-products.php
[edit]
[-] 54-imagecarousel.php
[edit]
[-] 01-iconbox.php
[edit]
[-] 04-rooms.php
[edit]
[-] 02-distance.php
[edit]
[-] 01-icon.php
[edit]
[-] 19-our-process.php
[edit]
[-] 04-category-tab.php
[edit]
[-] 08-testimonialslider.php
[edit]
[-] 01-review-items.php
[edit]
[-] 01-subscribe.php
[edit]
[-] 20-countdown.php
[edit]
[-] 12-videoplay.php
[edit]
[-] 01-image-hotspot.php
[edit]
[-] 21-toggle-box.php
[edit]
[-] 56-schedule.php
[edit]