Currently subcategories are shown within the product loop.
how can a separate this so they are shown on their own row?
have tried to add this in functions.php but gives no change.
// Remove subcategories from the product loop
remove_filter( ‘woocommerce_product_loop_start’, ‘woocommerce_maybe_show_product_subcategories’ );
// Add subcategories before the product loop with priority 5
add_action( ‘woocommerce_before_shop_loop’, ‘cg_show_product_subcategories’, 5 );
function cg_show_product_subcategories() {
$subcategories = woocommerce_maybe_show_product_subcategories();
if ( $subcategories ) {
echo ‘<ul class=”products subcategories”>’, $subcategories, ‘‘;
}
}