WP_Query “OR”: Find posts by ID, Name or Post Title?
No. WP_Query class doesn’t support OR based conditional query on same table’s columns. So in this case you have to write your own SQL query. And as there is a query must to get this single post, it’s not gonna hamper the performance. 🙂 However, I have re-write your code a slightly different way. This … Read more