Sauter la navigation

[Résolu] Don’t show any results until filter is applied

This support ticket is created Il y a 8 mois et 1 semaine. 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

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

Dernière mise à jour par Waqar Il y a 8 mois et 1 semaine.

Assisté par: Waqar.

Auteur
Publications
#2693890

Hi, a few years ago I got your help with a page with a filter, where adresses are shown, when a filter is applied (for example on this page: lien caché).

The old ticket with your help can be found here: https://toolset.com/forums/topic/dont-show-any-results-until-filter-is-applied-2/

A few days ago I had to put up a new page with a different category chosen (lien caché). I did that by adding the same view (as a new copy) on the new page. Now somehow the initial problem comes up again - somehow when loading the page at first, all the results show up, even it is a exact copy of the other page. Can you see what I am doing wrong with this new page?

I can set you up a admin-account for the site, if this helps you having a look at it.
Thanks for a feedback and regards
Christoph

#2693906

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi Christoph

I see in the earlier thread there were a few different attempts to make this work.

Since then we updated our documentation with simple directions for achieving this with the Block editor.

Could you please review this page and try to apply the same on your site to see if it works?

https://toolset.com/course-lesson/creating-a-custom-search/#hide-the-search-results-until-the-first-search

#2694094
screenshot-2.jpg
screenshot-1.jpg

Hello Nigel

Thanks for the hint. I did like described in the page, but it doesn't work. Above the "Edit Condiction" Button I get the message "incomplete condition". Am I missing something? See attached two images.

Regards Christoph

#2694105

Hi Nigel

Ok, got it to work :). My next question is - how can I insert a message at the bottom ("Bitte wählen Sie einen Kanton.") at first page load (like on this page for example: lien caché)?

Regards
Christoph

#2694299

Hi Christoph,

Thanks for the update and glad that Nigel's message helped.

To show the message at the bottom ("Bitte wählen Sie einen Kanton."), you can include another conditional block right below the one you added for hiding the results but with the reverse condition ( ref: https://toolset.com/course-lesson/creating-a-custom-search/#hide-the-search-results-until-the-first-search ).

For this block's condition, you'll use the 'eq' (equal) operator, instead of the 'ne' (not equal) operator. Inside this conditional block, you can show any text message.

regards,
Waqar

#2694307

Perfect, thank you!
Regards, Christoph