Passer la navigation

[Résolu] Hide and show search items in search bar

This support ticket is created Il y a 1 year, 8 months. 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
- 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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Minesh Il y a 1 year, 8 months.

Assisté par: Minesh.

Auteur
Publications
#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
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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
lien caché

#2780097

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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:
- lien caché
- lien caché
- lien caché

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/