Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ok - if you want to drop the AJAX then you need to add the Search Button to your "Search and Pagination" Section to that should help to submit/trigger the sorting. Once you add the search button let me know and I will see if there is any requirement to adjust the code after adding search button.
HI Minesh
We already have 2 Search and Reset buttons in the Search and Pagination section. One set to appear at the top of the filter critieria and another at the bottom. We know that the user has to manually click the Search button to refresh the results currently.
Kind regards
Simon
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ahh - I totally missed that.
I've adjusted the code as given under in the case of not using AJAX:
function func_set_default_orderby_modified( $view_args, $view_settings, $view_id ) {
$target_view_ids = array(2145,2231);
if( in_array($view_id, $target_view_ids ) and !isset($_GET['wpv_filter_submit']) ) {
$view_args['orderby'] = 'post_modified';
}
return $view_args;
}
add_filter( 'wpv_filter_query', 'func_set_default_orderby_modified', 101, 3 );
Can you confirm it works as expected.
HI Minesh
I tested. It seems to be working. Thank you. Please set status back to Escalated to 2nd tier.
Kind regards
Simon
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Ok - great.
I will get in touch with you as soon as the official fix will be released.