my issue is resolved by the patch and by the update
i'm still using the filter hook to filter term results in specific places.
using a hire' taxonomy the content manager can select easily, as string to filter the terms results of the taxonomy being used as a view filter.
but using the pre hook wpv_filter_taxonomy_frontend_search_get_terms_args<s/trong> with $args['name__like'] = "filtering_string" doesn't allows me to use multiple terms to compare to the terms-query being sent.
another concern is, when i'm using the filter hook, and it changes the "get_terms" for the filter, does it filter the view actual results OR just effects the available filter-form-inputs list?
1. how can i achieve filtering the results after they came as result of "get_terms" (by using the other hook wpv_filter_taxonomy_frontend_search_available_terms) and not like the frontend_search_get_terms_args example (https://toolset.com/forums/topic/view-tax-filter-w-ajax-show-only-available-inputs-displays-all-on-page-load/#post-2068801)
2. and most important - filter by multi values - coming from a different taxonomy or a Types CF field
add_filter( 'wpv_filter_taxonomy_frontend_search_available_terms', 'ycm_modify_available_terms', 10, 3 );
function ycm_modify_available_terms( $args, $taxonomy, $view_id ) {
if ($view_id === "9230"){
global $post;
$current_channel = $post->ID;
$channel_taxonomy_terms_filtering = get_the_terms( $current_channel , 'helper_taxonomy' );
// if we are filtering input-terms of taxonomy "episodes" filter
if ($taxonomy === "episode"){
// get only episodes names/slugs similar to some filtering strings or array
...
...
???
}
}
return $args;
}
for example:
channel cpt post name "Some Channel" - displays a view of video cpt with "category" same as category of the page displayed in, and uses "programs" taxonomy as (user input) secondary filter to show videos belong to specific program.
"Some Channel" is checked with "category" of "some-channel" and in "programs" taxonomy checked with "local-news" and "law-talk".
the view would show videos of "some-channel" category, and the programs filter will show all the programs that assoc' to video results from category "some-channel" - but only ones with "local-news" or "law-talk" in it, like "law-talk-live" and "law-talk-audio" and "local-news-morning" ...
sometimes videos belongs to same category but have 2 programs, and the other program is not in the channel "scope".
so i'm using the programs taxo' on the channel cpt to associate programs to channels and by that filter input-terms of filters in the view.
i thought it would be "lighter" then using a post relationship.
i'm using channel cpt to "create" programs pages. with a radio field as type of channel/program.
the category taxonomy have channels and programs names as terms. category is used also for videos cpt (displayed in view on channels or programs)
big mess - i inherited the situation to fix, on a live site, clean up and rearrange - i know 🙂
( maybe the best way is to make a new cpt for programs, with programs taxonomy, then copy all the relevant parts from the channel cpt content template to the new one.
programs taxonomy will filter the videos view on the program cpt page, and front-end filter of episodes taxonomy.
programs have many2many relationship.
channel cpt will use category taxo' as filter. channel page have programs pages links as a view of related "program" post type.
and display viedos view (same category of channel) and with front-end filter of programs )