This plugin adds the ability to geo-locate topics in bbPress and to search topics by location from a new search widget.
Originally developped for a classified ads forum (allowing ads to be geo-located).
View it in action and test it here
- Works both for frontend & backend.
- Powered by the w3c geolocation; which means that the plugin can guess your current location if your browser has this feature.
- Widget to search posts by location (and radius).
- Search results displays the distance between the input location and the posts located.
- Saves latitude & longitude separately in posts metas (‘_bbptl_lat’ and ‘_bbptl_lng’).
See it in action on our forums.
For feature request and bug reports, please use the
If you are a plugin developer, we would like to hear from
you. Any contribution would be
- Copy this plugin directory to
- Activate plugin.
- How can I customize the templates ?
Plugin templates are loaded with the function bbptl_locate_template().
That function first checks if a template exists in your themes then load the default templates of the plugin.
So, if you want to have the plugin using your custom templates, just create a directory “bbpress-topic-location” under your current theme direction,
copy the files from the bbpress-topic-location/theme in it, and edit those files.
Please be careful and don’t remove hooks because this could break the plugin.
- How can I use functionnalities this plugin have elsewhere on my website ?
See functions listed in the file bbptl-template-tags.php
Contributors & Developers
“bbPress Topic Location” is open source software. The following people have contributed to this plugin.
Interested in development?
- Added admin settings
- New template functions bbptl_post_has_geo(), bbptl_post_address(), bbptl_get_post_address(), bbptl_post_latitude(), bbptl_get_post_latitude(), , bbptl_post_longitude(), bbptl_get_post_longitude()
- Added class ‘has-location’ for topics and replies having a location
- Various code improvements
- Allow to get results without search terms set (see functions bbpress_add_dummy_keyword and bbpress_remove_dummy_keyword)
- when geolocated posts are found, displays distance between origin point and post location
- bbPress custom search widget, with geolocation parameters
- ability to search forum posts by location (and radius)
- code refactoring
- ‘Guess my location’ now returns a readable address instead of coordinates
- 2 new files : bbptl-ajax.php & bbptl-template-tags.php
- Uses native bbpress functions
- Bugs fixed
- Clode cleanup
- Screenshots, readme update, css fixes.
- Initial launch