WP_Tax_Query Generator

Home » WordPress Generators » WP_Tax_Query Generator

Related query generators WP query generator WP term query generator WP comment query generator Go back to all generators

The name of the query variable that will be created.
The logical relationship between each taxonomy.
The slug of the taxonomy.
The comma-seperated terms of the taxonomy to be queried.
The field to match the terms against.
MySQL operator to be used for terms.
Include Children
                    $tax_query = array(
	'relation' => 'AND',

	array(
		'field' => 'term_id',
		'include_children' => true,
		'operator' => 'IN',
	);
);

                

Sign up to save your WordPress snippets on WPTurbo.