Home › Forums › Calendar Products › Filter Bar › Modify "Near" field title in the Tribe location search bar
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by Brook.
-
AuthorPosts
-
March 18, 2014 at 2:03 pm #120846JanetParticipant
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.
March 19, 2014 at 9:32 am #121110BrookParticipantHowdy aabarnod,
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!
– Brook
March 19, 2014 at 9:52 am #121128BrookParticipantI 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
– Brook
March 20, 2014 at 6:56 pm #121684JanetParticipantThis is great and I was able to solve my issues. Is there a way to adjust the “no events found” message? Which file would I find that in? I’d like to include some instruction on adjusting the range with the filter to find more results
March 21, 2014 at 7:26 am #121779BrookParticipantAwesome! You actually can use that same snippet to modify the No Results Found as well. Just copy the if {…} statement, and modify the part within the parentheses to match the exact text string you want to modify. Then change that text string.
Does that make sense?
– Brook
April 8, 2014 at 7:43 am #129464BrookParticipantHowdy aabarnod,
Since this thread has gone two weeks without a reply I am going to close it. If at any point in the future you would like to pick this topic up, feel free to open a new thread. Thanks!
– Brook
-
AuthorPosts
- The topic ‘Modify "Near" field title in the Tribe location search bar’ is closed to new replies.