Is it possible to wrap Geo Location search around WP_Query?

I would duplicate the coordinates of the posts in a separate table (post_id, lat, lon), with an index on (lat, lon). With all the joins and the casts I doubt the database can use an efficient index with your query.

I once wrote an answer to a similar question using this approach.

Leave a Comment