Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#38308 new feature request

Accept 'meta_query' parameter in `WP_Tax_Query`

Reported by: hrohh's profile Hrohh Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.4
Component: Taxonomy Keywords: needs-patch
Focuses: Cc:


It would by possible to extend like that?

$args = array(
        'post_type' => 'post',
        'tax_query' => array(
                        'taxonomy'      => 'people',
                        'field'         => 'meta',
                        'meta_query'    => array(
                                        'key' => 'map',
                                        'compare' => 'EXIST'
$query = new WP_Query( $args );

Change History (3)

#1 @boonebgorges
8 years ago

  • Component changed from Query to Taxonomy
  • Focuses administration removed
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from wp query and term metadata to Accept 'meta_query' parameter in `WP_Tax_Query`
  • Version changed from trunk to 4.4

Hi @Hrohh - This is a very interesting idea. It's more of an enhancement request for WP_Tax_Query than for WP_Meta_Query, so I'm going to recategorize the ticket as appropriate.

Version 0, edited 8 years ago by boonebgorges (next)

#2 @boonebgorges
7 years ago

#41265 was marked as a duplicate.

#3 @boonebgorges
7 years ago

I like this idea, but we'll need to see at least a proof-of-concept patch to move forward with it. There are a number of questions I've got about how queries will be constructed and cacheability - whether we should use IN ( results of a WP_Term_Query ) or a separate JOIN - that will only be clearer once we've got some patches to benchmark.

Note: See TracTickets for help on using tickets.