Hello,
You are right, there isn't such a built-in feature within Toolset Views/Blocks plugin, you can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.
And the document for filter wpv_filter_query is here:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
Currently, you can try these:
1) edit your view, in section "Filter", add a select dropdown for post type filters into your filter form::
[wpml-string context="wpv-views"]Post Type:[/wpml-string] [wpv-control url_param="wpv-post-type" type="select" values=",page,post" display_values="All,Page,Post"]
You can manually add more post type into it.
2) add below codes into your theme/functions.php:
add_filter( 'wpv_filter_query', 'post_type_filter_func', 10, 3 );
function post_type_filter_func( $query_args, $settings, $view_id ) {
if ( $view_id == 123 && isset($_GET['wpv-post-type'][0]) && !empty($_GET['wpv-post-type'][0]) ) {
$query_args['post_type'] = $_GET['wpv-post-type'][0];
}
return $query_args;
}
add_filter('wpv_filter_register_url_parameters_for_posts', function($attributes, $view_settings){
if($view_settings['view_id'] == 123){
$attributes[] = array(
'query_type'=> 'posts',
'filter_type'=> 'post_type',
'value'=> 'custom_field_value',
'attribute'=> 'wpv-post-type',
'expected'=> 'string',
);
}
return $attributes;
}, 99, 2);
Please replace 123 with the View's ID of step1)
And test again.