[wp-trac] [WordPress Trac] #56370: Taxonomy parameter in a WP_Query not merged correctly with already existing taxonomy query with OR relation.

WordPress Trac noreply at wordpress.org
Sun Aug 14 23:18:13 UTC 2022


#56370: Taxonomy parameter in a WP_Query not merged correctly with already existing
taxonomy query with OR relation.
----------------------------+------------------------------
 Reporter:  hugod           |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Query           |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  has-unit-tests  |     Focuses:
----------------------------+------------------------------

Comment (by peterwilsoncc):

 Thanks for the ticket @hugod

 I think this is a case in which it is very difficult to interpret the
 developer's intent.

 I can see your argument but I can also see why another developer may think
 that having specified `OR`, it ought to apply to all taxonomy types, no
 matter how they are entered.

 I think the best way to fix this is to recommend developers use either
 `cat*` and `tag*` OR `tax_query`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56370#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list