Modify "Near" field title in the Tribe location search bar
I’d like to modify the “Near” label on the location search bar so that it gives a little more instruction to our users on how to find a better match. City, State for example. Where do I edit the label?
Also, is there a way to add custom search distances to the filter bar? Currently list default is 5 miles to 250 miles. I’d like to offer greater distances to say up to 500 miles.Correct Answer
The relevant Filter is actually added by the PRO addon, oddly enough. Its Class can be found here: \events-calendar-pro\lib\TribeEventsFilter_GeoLoc.php
On line 15 you will notice that it runs the distance labels and their values through the WP Filter ‘geoloc-values-for-filters’. Simply hook into that filter and return whatever values you want, and you should be rocking!
Does that make sense? Will that work for you? Please let me know. Cheers!
I forgot to answer your first question. Whoops!
You can modify any text string in our plugin, and even most other plugins, using a snippet like the following.
Alternatively you can make larger modifications, including ones like this, by following our themer’s guide. From the sounds of it the specific file you want to modify would be: /the-events-calendar/views/modules/bar.php