[Gelöst] Toolset maps distance Unit should only be Kilometers
This support ticket is created vor 5 Jahren, 8 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
Hello. Thank you for contacting the Toolset support.
Well - the thing is that the distance radius and radius unit (km,mi) is displayed using the placeholder %%DISTANCE%% as you can see with the following shortcode:
[wpv-control-distance default_unit="mi" compare_field="stud-city" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit" inputs_placeholder="Show results within %%DISTANCE%% of %%CENTER%% here you go"]
The only way I would suggest is using jQuery to remove unwanted distance unit option from the radius unit (km,mi) dropdown - sounds good?
You should try to add the following code to "Search and Pagination" sections Js box of your view to remove the km option.
Thanks. It works. But it was MILES, we do not need in Germany.
But it is still a select. Could me remove this? Do we use this UNIT or is it possible to remove this select and the search will know it is kilometers to show and calculate?
well - when you add your distance filter - you need to make sure within the "Query Filter" section of your view that the filter is set to filter by km rather than mi.
You can use the following simple Js to hide the dropdown: