Support » Fixing WordPress » Meta Query w/ AND and OR

  • whatadewitt

    (@whatadewitt)


    http://pastebin.com/M528Ds9L

    What I’m trying to do here is query by meta where “meta_key1” = X OR “meta_key2” = X but it’s mixed in there with a couple of other meta keys that would be ANDs

    in the most basic explanation I’m trying to say

    this AND this AND (this OR this)

    but I can’t seem to figure out how to do it.

    Can anyone help me out? Thanks!

    –d

Viewing 1 replies (of 1 total)
  • vtxyzzy

    (@vtxyzzy)

    I am not sure you can handle this with meta_query, but it can probably be done using filters on the query. Can you be more specific about the key names and values that you want to select?

Viewing 1 replies (of 1 total)
  • The topic ‘Meta Query w/ AND and OR’ is closed to new replies.