[wp-trac] [WordPress Trac] #31680: get_queried_object on multiple taxonomies

WordPress Trac noreply at wordpress.org
Wed Mar 18 10:22:52 UTC 2015


#31680: get_queried_object on multiple taxonomies
-------------------------+-----------------------------
 Reporter:  thomask      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Query        |    Version:  4.1.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 When i use get_queried_object (or WP_Query->queried_object) with queriing
 multiple taxonomies, it returns only one. E.g. when i do
 /?brand=tefal&product_line=pan
 queried_object return only brand taxonomy, not the product_line taxonomy
 WP_Query->query returns both of them
 this is bit similar to this ticket:
 https://core.trac.wordpress.org/ticket/5358 but it is only about multiple
 terms in one taxonomy, not multiple taxonomies and from unknown reasons it
 was several times postponed.
 I guess that the solution will be the same, so introducing the
 get_queried_objects, i just think that in this case we should change also
 the get_queried_object function to simply select the first (filtered
 option) object from the global queried_objects, so we could maintain only
 one query, not two. and also if multiple taxonomies (or terms) are
 queried, wp should by default return their intersection and sums (by
 default intersection for combination of taxonomies+terms as in this
 example, and sum for queries with multiple terms, e.g.
 brand=tefal+rowenta)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31680>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list