Saltar navegación

[Resuelto] Hide and show search items in search bar

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Minesh 1 year, 8 months ago.

Asistido por: Minesh.

Autor
Mensajes
#2779985

Dear support,

I want to ask if there is any way to create a button in search bar in order to show and hide some elements. I don't want all my search fields to be visible. I need a "more" button in order to hide some items.

Kind regards

#2779996

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Do you mean you have custom search view where you have added many search filters and out of those you only want to show some and add some fields to toggle button so when toggle button active those custom search fields should show otherwise not.

#2780020

Hi Minesh.

Yes ! This is my request! I want this toggle button, to hide some search fields in order to make my search bar a little more compact, because I want to put it in my homepage.

Here is the link from my search view
enlace oculto

#2780097

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

ok. Thank you for confirmation but there is no native feature to toggle the search fields.

However, you can achieve this by adding some custom JS code and some adjustment with classes or HTML.

Please check the following links that might help you:
- enlace oculto
- enlace oculto
- enlace oculto

More info:
- https://toolset.com/course-lesson/adding-custom-javascript-to-views-templates-and-archives/
- https://toolset.com/course-lesson/adding-custom-css-to-templates-archives-and-views/