Home › Forums › Calendar Products › Events Calendar PRO › Geolocation based on city or area code
- This topic has 3 replies, 3 voices, and was last updated 8 years, 1 month ago by Support Droid.
-
AuthorPosts
-
February 29, 2016 at 7:42 am #1083325CesarParticipant
Hi Guys,
Nice products!I’m close to launch my website and I wonder if there is possible to autofill “Near” field with for example the area code of the client or name of the city. Also when I write for example “Paris” it does not return a thing :/
If you need access let me know.
Thank you.
CesarFebruary 29, 2016 at 8:08 am #1083353CesarParticipantCan you tell me which criteria is matched when searching with “Near” field? SQL statement for instance…
Where can I modify it?For example if I use the name of the country none return is given :/
Thank you
February 29, 2016 at 7:22 pm #1083667CliffMemberHi Cesar. Thanks for your questions.
The “Near” field that Pro adds to the Tribe Bar is from this file: /wp-content/plugins/events-calendar-pro/src/Tribe/Geo_Loc.php
The default geofence radius is 25 miles, which can be filtered — find function get_geofence_size() in that file.
As far as autofilling the search field, you can just link to your site’s search — like this being the URL for searching “New York, NY, USA”: yoursite/events/2016-02/?tribe-bar-geoloc-lat=40.7127837&tribe-bar-geoloc-lng=-74.00594130000002&tribe-bar-geoloc=New+York%2C+NY%2C+USA — just remove the “2016-02/” part so it doesn’t always go to February 2016.
If you prefer a shorter URL: yoursite/events/?tribe-bar-geoloc=New+York%2C+NY%2C+USA will autofill the field but not actually filter the results. In other words, they’d still need to click the “Find Events” button to submit the search.
I hope this is the information you were looking for.
March 15, 2016 at 9:35 am #1089175Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Geolocation based on city or area code’ is closed to new replies.