[wp-trac] [WordPress Trac] #35930: Search in meta posts
WordPress Trac
noreply at wordpress.org
Wed Feb 24 09:35:02 UTC 2016
#35930: Search in meta posts
------------------------------+-------------------------
Reporter: sebastian.pisula | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version:
Severity: normal | Resolution: maybelater
Keywords: | Focuses:
------------------------------+-------------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => maybelater
Comment:
> Relation in Meta Query is for few meta keys but not for relation between
search fields (post title / excerpt / content) and meta query
Correct, for `WP_Query` we currently only support the `AND` relation
between parameters passed. You can't for example select `post_id = 123 OR
post_name = test-page`, the same goes for search and meta_queries.
There's been similar proposals in the past to allow merging two WP_Query
instances and returning a union of their results, for example: #4065
I'm going to close this as maybelater for now though, merging of two
distinct queries or providing a way to specify the relation between
individual top-level parameters isn't something we can easily support
right now.
As for the original intention of wanting to search in a metakey as well,
you'd be far better off using something custom or something based off one
of the search-related SQL filters.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35930#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list