Skip Navigation

[Resuelto] Hide the default filter radius and distance radius unit

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem

I want to hide the default filter radius and distance radius units so it can't be changed, on a Front End Filter by Distance.

Solution

It's not possible out of the box.

The Distance filter comes as a whole set of controls.

To hide the single KM/MI selector you have to apply Custom CSS.

You can hide the input

#toolset-maps-distance-value

(ID attribute of Input addressed)
and select

#toolset-maps-distance

(select with ID toolset-maps-distance).

To edit the strings "Show results within %%DISTANCE%% of %%CENTER%%" you can do so on the GUI when you edit this Filter.

You can as well remove that text, which can suit the needs in this case.

This support ticket is created hace 6 años, 9 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Edward Barker hace 6 años, 9 meses.

Asistido por: Beda.

Autor
Mensajes
#623838

I'm trying to develop a front page search where it uses the default value of a five mile radius from any given location and I want to hide the default filter radius and distance radius unit so it can't be changed and is clean to look at.

I know there's not a default setting that can be amended but is there a workaround?

Cheers

#623941

It's not possible out of the box.

The Distance filter comes as a whole set of controls, and there is no way to remove them with the GUI.
You can only modify them because we need them for the search and the purpose of the search is, that the user also can use it on the Front End.

Now, to hide the single KM/MI selector you have to apply Custom CSS.

You can hide the input #toolset-maps-distance-value (ID attribute of Input addressed) and select #toolset-maps-distance (select with ID toolset-maps-distance).
To edit the strings "Show results within %%DISTANCE%% of %%CENTER%%" you can do so on the GUI when you edit this Filter.
You can as well remove that text, which can suit your needs.

I suggest becoming familiar with the Browser Console if you are not already.
There you will see exactly what CSS to apply where.

#624019

Brilliant stuff, funnily enough I was super close to resolving it myself but there was another conflict that I didn't notice.

For the record and if anyone else has the same issue the CSS I used to resolve the issue is as follows .......

#toolset-maps-distance-value {
display: none;
}

#toolset-maps-distance {
display: none;
}