Answers for "tax query in wordpress by term id"

PHP
0

tax query by term id

<?php
$args = array(
'post_type' => 'recipe_cpt',
'tax_query' => array(
    array(
    'taxonomy' => 'recipe_tx',
    'field' => 'term_id',
    'terms' => 37
     )
  )
);
$query = new WP_Query( $args ); ?>
Posted by: Guest on December-09-2020
0

wp tax_query in

'tax_query' => array(
    array(
        'taxonomy' => 'video_type',
        'terms' => 'episode',
        'field' => 'slug',
        'include_children' => true,
        'operator' => 'IN'
    )
),
Posted by: Guest on June-04-2021

Browse Popular Code Answers by Language