'product', 'posts_per_page' => $product_number ); } elseif($product_type == 'upsell_product'){ $product_args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'meta_key' => 'total_sales', 'orderby' => 'meta_value_num', 'posts_per_page' => $product_number ); } elseif($product_type == 'feature_product'){ $product_args = array( 'post_type' => 'product', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'featured', 'operator' => 'IN' ) ), 'posts_per_page' => $product_number ); } elseif($product_type == 'on_sale'){ $product_args = array( 'post_type' => 'product', 'meta_query' => array( 'relation' => 'OR', array( // Simple products type 'key' => '_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'numeric' ), array( // Variable products type 'key' => '_min_variation_sale_price', 'value' => 0, 'compare' => '>', 'type' => 'numeric' ) )); } return $product_args; } endif; $prod_type = array( 'latest_product' => esc_html__('Latest Product', 'appzend'), 'upsell_product' => esc_html__('UpSell Product', 'appzend'), 'feature_product' => esc_html__('Feature Product', 'appzend'), 'on_sale' => esc_html__('On Sale Product', 'appzend'), ); $product_types = get_theme_mod( 'appzend_producttype_category',"latest_product,upsell_product,feature_product,on_sale"); $product_types = explode(',', $product_types); $product_number = get_theme_mod( 'appzend_producttype_no_of_product', 4 ); $column_number = get_theme_mod( 'appzend_producttype_column', 3 ); $tab_style = 'tab_styleone'; //get_theme_mod( 'appzend_producttype_layout', 'tab_styleone' ); $layout = get_theme_mod( 'appzend_producttype_category_view', 'grid' ); $css = array(); $css[] = 'product-hover-style1 woocommerce'; $css[] = 'producttype-wrap section-wrap'; $css[] = 'layout-'.esc_attr( $layout ); $type = ''; //get_theme_mod('appzend_producttype_bg_type'); $bg_video = ''; // get_theme_mod("appzend_producttype_bg_video", '1IaZy0sDLu0'); if( $type == "video-bg" && $bg_video): $video_data = 'data-property="{videoURL:\'' . $bg_video . '\', mobileFallbackImage:\'https://img.youtube.com/vi/' . $bg_video . '/maxresdefault.jpg\'}"'; else: $video_data = ''; endif; ?>
>
$val) : ?>
    style="display:none" > have_posts()) { while($query->have_posts()) { $query->the_post(); ?>