Function: get_tax_sql

get_tax_sql( array $tax_query, string $primary_table, string $primary_id_column )

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

Shortcut: gts

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Parameters

Name Type(s) Default Value Description
$tax_query array

A compact tax query

$primary_table string
$primary_id_column string

Returns

array

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.