Support

Account

Home Forums Front-end Issues Multiple ID's in relationship field — LIKE query returns inappropriate posts Reply To: Multiple ID's in relationship field — LIKE query returns inappropriate posts

  • PS.

    What I ended up doing, which is horrible and terrible for performance, is allow the query to run, and then in my loop, check *again* for the value:

    if (in_array($ID, get_field('location'))) {

    …and basically only run / output content in this if statement. This means it’s actually doing the query, retrieving the post, and then doing some junk crap to prevent it from showing up if we don’t past the in_array test.

    It works, but not good. Is there a better way to do this?