function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {}

Given a taxonomy query, generates SQL to be appended to a main query.


  • array $tax_query: A compact tax query
  • string $primary_table
  • string $primary_id_column

Source code

function get_tax_sql( $tax_query, $primary_table, $primary_id_column ) {

	$tax_query_obj = new WP_Tax_Query( $tax_query );

	return $tax_query_obj->get_sql( $primary_table, $primary_id_column );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: