Tell us what you are trying to do?
I'm trying to create a custom search that only displays results if the search text field is not empty.
Is there any documentation that you are following? - This isn't covered in this document.
https://toolset.com/course-lesson/creating-a-custom-search/
So even if the search box is empty all the items are listed in view loop below. If text is added to search box it filters the results but I want to stop all the results appearing before search field is actually used.
I tried to achieve this by adding a conditional block and set it to:
NOT ( empty( '[wpv-search-term ]') )
e.g. Views Shortcode > Search term is NOT empty
This isn't working though. Can you please advise on how I can do this?
Thank you.
I see now further down the support document it says how to do this.
So I added a conditional block and used the suggested shortcode -
( ( '[wpv-search-term param ='wpv_view_count'] ne '' ) )
This doesn't allow me to save the block it comes back with error "Please, complete all the conditions or remove them".