[wp-trac] [WordPress Trac] #25245: Issue with SQL query generated by pre_get_posts

WordPress Trac noreply at wordpress.org
Fri Sep 6 19:26:26 UTC 2013


#25245: Issue with SQL query generated by pre_get_posts
---------------------------+------------------------------
 Reporter:  greendemiurge  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Query          |     Version:  3.6
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+------------------------------
Changes (by SergeyBiryukov):

 * component:  General => Query


Comment:

 Note that you can add `'relation' => 'OR'` to your meta query to get this:
 {{{
 ... meta_key = '_shortdescription' ... OR ... meta_key =
 '_shortdescription'
 }}}
 However, looks like there's no way to change the `AND` before the meta
 conditions using just `meta_query`.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25245#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list