Tell us what you are trying to do?
I want the search page to show no results until a search is performed
Is there any documentation that you are following?
https://toolset.com/forums/topic/trying-to-load-page-without-initial-search-result/
Is there a similar example that we can see?
Not that I am aware of.
What is the link to your site?
enlace oculto

Minesh
Colaborador
Idiomas:
Inglés (English )
Zona horaria:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
As I understand, you do not want to display any results under yellow section until the search if performed. If that is true, you will require to use the view's filter hook: wpv_filter_query
- https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
For example:
- You can add the above code to "Custom Code" section offered by Toolset:
=> https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/
add_filter( 'wpv_filter_query', 'func_display_no_result_by_default', 10, 3 );
function func_display_no_result_by_default( $query_args, $setting,$view_id ) {
//// 4952 is your view ID, please adjust view ID if required
if($view_id == 4952) {
if(!isset($_REQUEST['wpv_filter_submit'])) {
$query_args['post__in'] = array(0);
}
}
return $query_args;
}
Where:
- please adjust the filter code if required as per your requirement