Saltar navegación

[Resuelto] Use Radio on desktop, but Select on mobile

This support ticket is created hace 3 años, 5 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Zona horaria del colaborador: America/Jamaica (GMT-05:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por kristofG hace 3 años, 5 meses.

Asistido por: Shane.

Autor
Mensajes
#2269347

I have 2 filters with radio buttons that are quite long. This is no issue on desktop, but on mobile it causes the filtered results to be displayed a few scrolls down. So I added both type=radio and type=select in the View (hide select on desktop and vice versa).

[wpv-control-post-taxonomy taxonomy="locatie" type="radios" url_param="locatie"]
[wpv-control-post-taxonomy taxonomy="locatie" type="select" url_param="locatie" default_label="Kies een plaats"]

The dropdown works on mobile, but the radio buttons no longer filter on desktop.
How can we fix this so we have radio on large screens and select on small screens?

enlace oculto

#2269773

Shane
Colaborador

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Kristof,

The problem here is that you're not allowed to have the same filter shortcode with multiple display styles because 1 filter shortcode is tied to query filter.

My advice here is that you're going to need to create a separate copy view that you will hide on desktops but only display on mobiles. If elementor supports this then you can have both views on the page and the desktop version will only show on the desktop and the mobile version will only show on the mobiles.

Please let me know if this helps.

Thanks,
Shane

#2272409

Thank you. I have duplicated the View so I have a desktop version with Radio buttons and a mobile version with the Dropdowns. Via css I hide the one on desktop and vice versa.