Skip Navigation

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

This support ticket is created 2 years, 3 months ago. 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 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by kristofG 2 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#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?

hidden link

#2269773

Shane
Supporter

Languages: English (English )

Timezone: 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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.