Logic for Nearby places with post and categories


I’m developing a website which has states as categories and posts as cities. What we are trying to do is identify each post (city) and also show nearby cities to the current city.

As of now we are simply using the category as the only filter and “nearby” is not actually nearby. (Similar to how related posts work)

We tried to use Tags (adding some hidden tags by creating fake region division) but that has become complex on the fact that a city can also be near to another city from another state.

I’m thinking of using a custom field with longitude or latitude as a matching value.

Has anyone tried this or suggest an idea to make it simpler.


>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/logic-for-nearby-places-with-post-and-categories/">

Logic for Nearby places with post and categories</a>
, Naveen Narale 7 years 0 Answers 61 views 0

Leave an answer