Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: What does BP.org use to power the “current location” field in our profiles?


Boone Gorges
Keymaster

@boonebgorges

Thanks for the note about the API key. I removed it from the original post.

The kind of sorting you’re talking about is possible but is quite a bit trickier. I have successfully used https://wordpress.org/extend/plugins/buddypress-geo/ is a starting point for that kind of filtering, but the repo version of the plugin is broken, and I’ve modified it fairly heavily to make it work for my projects. One day I hope to release a cleaned-up and improved version of BP Geo.

The basic gist is that you need to (a) use Google’s geocoding to turn location info into lat/long which you then store, and (b) use some fancy math (nicely defined in bp-geo) to do the proximity filtering.

Skip to toolbar