We are thinking that it is a caching issue. We reset everything and accessed it from a remote location and it is working. We are very sorry for all of this, please try it one more time.
As there is no way to pass the shortcode argument to Block views, I've added the following view's filter that will allow us to pass the current post title dynamically and filter the view. I've added the following code to "Custom Code" section offered by Toolset:
add_filter( 'wpv_filter_query', 'func_custom_title_filter', 10, 3 );
function func_custom_title_filter( $query, $view_settings, $views_id ) {
if ( $views_id == 56945 ) {
global $WP_Views;
global $post;
if(isset($WP_Views->view_shortcode_attributes[0])){
$query['s'] = $post->post_title;
}
}
return $query;
}
I can see its working as expected, Can you please confirm it works at your end as well.
Yes this is what I was expecting. I would need to create another section for another show, would I be able to use the same custom js cote with the duplicate view?
Yes this is what I was expecting. I would need to create another section for another show, would I be able to use the same custom js cote with the duplicate view?
==>
This is not JS code but Toolset hook which is based on php.
If you want to apply the view to multiple view IDs, you should change the following line of code: