Dealing with locations (lat, lon). E.g. “find nearest” / “xxxx in xxxx” type pages

[ad_1]

Fairly new to WP but experienced coder.

I’m migrating a travel site to WP and lots of the posts are location based. Eg, beaches, things to do, accommodation. I’m looking to have various pages along the lines of “Best beaches in town X” and “Things to do in town Y”.

At present I have put the coordinates into a ‘lat’ and a ‘lon’ custom field. Now I’m thinking I will just write a WP query to compare these locations with the coords for the particular place.

Seems fairly straightforward, but I just thought I’d check if there isn’t a better / best practice way of doing all this.

Thanks

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer