I need to exclude posts that have a custom field 'city' value of 'Melbourne'.
After much searching I think the solution might consist of 2 parts.
In functions.php : A function to get the post IDs for all posts which have a custom field 'city' value of 'Melbourne'.
Then in my loop : Exclude these posts using the post_not_in argument, using the returned ids from the first loop?
Is this the right approach? What is the correct code?