Hello. Thank you for contacting the Toolset support.
Well - To be able to keep navigating all the way through the categories - sub-categories until we reach the page/post level, I have following solution for you. I hope this will work for you as well.
1)
Create a taxonomy view. Name this view as "top-category-view"
=> Uncheck the checkbox "Don't show empty terms" at section "Query Options"
=> Add following code to it's loop output section [You can add fields as you wanted to loop output]:
<wpv-loop>
<a href="?taxonomy_id=[wpv-taxonomy-id]" target="_self" >
<h3 class="image-link-text">[wpv-taxonomy-title]</h3>
</a>
</wpv-loop>
2)
Add following code to your current theme's functions.php file:
add_filter( 'wpv_filter_taxonomy_query', 'filter_application_by_experience_years_func', 99, 4 );
function filter_application_by_experience_years_func($tax_query_settings, $view_settings, $view_id) {
if($view_id == 9999){
(!isset($_GET['taxonomy_id']))? $tax_query_settings['child_of']=0:$tax_query_settings['child_of'] = $_GET['taxonomy_id'];
}
return $tax_query_settings;
}
add_filter( 'wpv_filter_taxonomy_post_query', 'prefix_check_items', 20, 4 );
function prefix_check_items( $items, $tax_query_settings, $view_settings, $view_id ) {
if($view_id == 9999){
foreach( $items as $item ) {
$children = get_term_children( $item->term_id, 'product_cat');
if(count($children)==0){
$product_page=$_SERVER['REQUEST_SCHEME']."://".$_SERVER['HTTP_HOST']."/listing-page/";
$item->name = '<a href="'.$product_page.'?wpvproductcat='.$item->slug.'" target="_self" >'.$item->name.'</a>';
}else{
$item->name = '<a href="?taxonomy_id='.$item->term_id.'" target="_self" >'.$item->name.'</a>';
}
}
}
return $items;
}
Where:
== Replace '9999' with the view ID of "top-category-view" created at step #1
3)
Create a new page and add "top-category-view" view to list categories
4)
Create a new View, to list your CPT pages/post namely "category-post-list"
=> Add new query filter for your taxonomy "Categories" and save it
For example:
Select posts with taxonomy: Categories slug in one of those set by the URL parameter wpvproductcat
eg. <em><u>hidden link</u></em>
=> add fields to display your product as required at "loop output" section
5)
Create a new page namely "Listing page" and add view "category-post-list" created at step #4
I hope this way you can achieve your goal to navigate to endless subcategories and at the end display products that belongs to the last subcategory.