Skip Navigation

[Resolved] Search Results

This support ticket is created 3 years, 1 month 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 – 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: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by AkisR9050 3 years, 1 month ago.

Assisted by: Jamal.

Author
Posts
#2219901

Hello,
I' ve created a Search Page using a View.
I' ve added a text search filter and an Image box for the View Output. The problem is that when I visit the Page for the first time (before any search) all the possible results are displayed in the View Output.
Is there a way to have a Search Page without any results before the Search.
The Page is here: hidden link

Thank you in advance

#2220579

Hello and thank you for contacting the Toolset support.

That's not possible out of the box. But, it can be implemented with some custom code. Check this article https://toolset.com/documentation/programmer-reference/adding-custom-code/show-no-initial-results-for-views-custom-searches/

This is another example that uses the wpv_filter_query filter instead of the wpv_filter_query_post_process
https://toolset.com/forums/topic/how-to-require-user-to-select-at-least-one-parameter-in-custom-search/

Read more about Toolset hooks here https://toolset.com/documentation/programmer-reference/views-filters/
And how to use them https://toolset.com/documentation/programmer-reference/adding-custom-code/how-to-use-toolset-api-hooks-in-custom-code/

I hope this helps. Let me know if you have any questions.

#2221241
Screenshot 2021-11-15 at 12.11.29.png

Hello and thank you for your answer.

Unfortunately it didn't work.
I' ve created the Custom Code and I replaced the target_views but the results are still there.

The code is the following:

<!-- wp:toolset-views/view-editor {"reduxStoreId":"views-editor-1636888468514","viewId":4173,"viewSlug":"seachme","previewId":4174,"insertExisting":"0","wizardDone":true,"wizardStep":3,"columnsTablet":[0.5,0.5],"columnsDesktop":[0.5,0.5]} -->

I tried both "4173" and "4174" as well as "4173,4174" with no luck.

What else could I try?

Thank you again.

#2221255

False alarm. Cache did the problem.
Thank you for your time!