"", 'taxonomies' => '', 'count' => '12', 'featured' => '' ); extract(shortcode_atts($args, $atts)); $new_query = array( 'post_type' => 'post', 'posts_per_page' => $count, 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array( 'post-format-video' ), ), ) ); if( !empty( $featured ) ) $new_query['post__not_in'] = array( $featured ); if( !empty( $taxonomies ) ){ $vc_taxonomies_types = get_taxonomies( array( 'public' => true ) ); $terms = get_terms( array_keys( $vc_taxonomies_types ), array( 'hide_empty' => false, 'include' => $atts['taxonomies'], ) ); $tax_query = array(); $tax_queries = array(); // List of taxnonimes foreach ( $terms as $t ) { if ( ! isset( $tax_queries[ $t->taxonomy ] ) ) { $tax_queries[ $t->taxonomy ] = array( 'taxonomy' => $t->taxonomy, 'field' => 'id', 'terms' => array( $t->term_id ), 'relation' => 'IN', ); } else { $tax_queries[ $t->taxonomy ]['terms'][] = $t->term_id; } } $tax_query = array_values( $tax_queries ); $tax_query['relation'] = 'OR'; $new_query['tax_query'][] = $tax_query; } if( !empty( $featured ) ){ $featured_query = array( 'post_type' => 'post', 'p' => $featured, 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array( 'post-format-video' ), ), ) ); } ?>