Custom conditions in wp query

That can’t be done, since its translated to sql query I don’t see that code executing any where. You’ll have to do what @s_ha_dum said.

Do it the other way, its cleaner and readable.