$post_type, 'posts_per_page' => $number_post, 'orderby' => $orderby, 'order' => $order, ); if( count( $taxonomy_term ) ) { $tax_query = array( 'relation' => 'OR' ); foreach( $taxonomy_term as $term ){ $tax_query[] = array( 'taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $term, ); } $args['tax_query'] = $tax_query; } $the_query = new WP_Query( $args ); $element_attribute = array(); $el_classess = array( 'kc-owl-post-carousel', 'owl-carousel', 'list-'. $post_type, $taxonomy, $wrap_class ); if( isset($atts['nav_style']) && $nav_style !='' ){ $el_classess[] = 'owl-nav-' . $nav_style; } $owl_option = array( 'items' => $items_number, 'mobile' => $mobile, 'tablet' => $tablet, 'speed' => intval( $speed ), 'navigation' => $navigation, 'pagination' => $pagination, 'autoheight' => $auto_height, 'autoplay' => $auto_play ); $owl_option = strtolower( json_encode( $owl_option ) ); $element_attribute[] = 'class="'. esc_attr( implode(' ', $el_classess) ) .'"'; $element_attribute[] = "data-owl-options='$owl_option'"; ob_start(); if ( $the_query->have_posts() ) { global $post; if( !empty($title) ) echo '