TODO: To change the header's content go to Dr.Explain menu Options : Project Settings : HTML (CHM) Export : Setup HTML Template and Layout
×
Menu
Index

Lọc dữ liệu bởi Taxonomy

Lọc bài viết theo custom taxonomy.
$args=array(
    'tax_query' => array(
        'relation' => 'AND',
        array (
          'taxonomy' => 'business-type',
          'field' => 'slug',
          'terms' => array('term1','term2'),
          'operator'=>'IN'
        ),
        array(
            'taxonomy' => 'actor',
            'field' => 'id',
            'terms' => array( 103, 115, 206 ),
            'operator' => 'NOT IN'
        )
    ),
   
);
 
compare single taxonomy.
$args = array(
    'taxonomy' => 'taxonomy1'
);
 
 
Made with help of Dr.Explain

Unregistered version