1 ) have a front end google api field that gives me latitude and longidute
2 ) how do I filter my wp query by distance from the location indicated in the field on question 1?
case use:
My client has some houses and each house has an address.
visitor insert a city and the wp query filters the results and shows only the houses near that city (the distance is not important now, lets say 50km)
The extension MB Geolocation helps you enter an address then it will autosuggest a complete address and fill all other fields. In your case, I think you need to calculate the distance first, find the house (post) that has the shortest distance then show it on the map.
I am sorry but how can I use the geolocation extension on the front end? I successfully installed on the backend but how can I add a text field that autopopolate latitude and longitude fields with google API on the front end?
thank you in advance, always really helpful and fast
The front end form shows all the fields, in order to show only the address field is there a clean way to hide the others or I have to use css/javascript?