Problem with displaying subcategories and products
-
Hello,
I am trying to use following snippet to separate subcategories from product loop:// 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, '</ul>';
}
}It separates subcategories from products, but lists subcategories in 1 column, and I don’t know where should I change it. Below is the picture where subcategories end, and products start:
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.