Answers for "how to get all 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

get term id

get_queried_object()->term_id;
Posted by: Guest on June-29-2020

Code answers related to "how to get all term_id"

Browse Popular Code Answers by Language