Hi Ruenel,
I apologize for the delay, I’ve been swamped with the holidays.
I just checked and the account you have to access my site is an admin… so not sure what other privilege’s
I can give you there (admin is the highest level on my site… even my account is admin).
There is the following in my child theme’s function.php file in order to make it so my shop category pages display properly…
add_filter('cs_looper_custom_subcat', function($result, $args)
{
$category = get_queried_object();
$cat_args = array(
'hide_empty' => 1,
'parent'=> $category->term_id,
'taxonomy' => 'product_cat',
);
$subcats = get_categories($cat_args);
return $subcats;
}, 10, 2);
add_filter( 'get_terms', 'ts_get_subcategory_terms', 10, 3 );
function ts_get_subcategory_terms( $terms, $taxonomies, $args ) {
$new_terms = array();
// if it is a product category and on the shop page
if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() &&is_shop() ) {
foreach( $terms as $key => $term ) {
if ( !in_array( $term->slug, array( 'build-a-bundle','proshop','passes','open-session-rental-packages' ) ) ) { //pass the slug name here
$new_terms[] = $term;
}}
$terms = $new_terms;
}
return $terms;
}
I think that is all that I was told to put there. I had another support ticket to get it so my shop category pages displayed they subcategories correctly (they were not showing correctly out of the box).
Thank you,
Danny