how to pass multiple terms using short code terms and operator="IN"
-
I ld like pass multiple terms in shortcode
function portfolio_shortcode( .... ... $defaults = apply_filters( 'arconix_portfolio_shortcode_args', array( 'link' => 'image', 'thumb' => 'portfolio-thumb', 'full' => 'portfolio-large', 'title' => 'above', 'display' => '', 'heading' => '', 'orderby' => 'date', 'order' => 'desc', 'terms' => '', 'operator' => 'IN' ) ); .... .. /** If the user has defined any tax terms, then we create our tax_query and merge to our main query */ if( $terms ) { $tax_query_args = apply_filters( 'arconix_portfolio_shortcode_tax_query_args', array( 'tax_query' => array( array( 'taxonomy' => 'feature', 'field' => 'slug', 'terms' => $terms, 'operator' => $operator ) ) ) ); /** Join the tax array to the general query */ $args = array_merge( $args, $tax_query_args ); }
IS it possible to pass multiple terms while calling shortcode. the code seems not. can u suggest a method how can achieve the above goal
thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to pass multiple terms using short code terms and operator="IN"’ is closed to new replies.