When retrieving data, there times where you may want to change the WHERE clause in WordPress. That is, depending on what you’re retrieving, you may want to filter what it’s searching.
Displaying the last query, which is useful when doing light debugging.
Here, I’ll show how to use the API to change the WHERE clause so you’re not having to do so through a custom query.
Changing The WHERE Clause in WordPress