[wp-hackers] Custom Taxonomy Query - Select posts with a taxonomy AND none

John Blackbourn johnbillion+wp at gmail.com
Tue Mar 26 10:30:40 UTC 2013


On 26 March 2013 09:47, Mike Little <wordpress at zed1.com> wrote:
> Add terms to your custom taxonomies for "All Segments" and "All Price
> Bands".
>
> Assign those to the appropriate CPT's
>
> Then always add "All segments" to segment search terms, and "all price
> bands" to price band search terms.
>
> That will achieve the results you want with exactly the method you are
> using now.
>
> Mike

This is how I've achieved this in the past. Definitely the most
straight forward method, otherwise you'll need to write the SQL for
such a query.

John


More information about the wp-hackers mailing list