V
V
Vadim Timoshenko2018-08-06 12:42:35
WordPress
Vadim Timoshenko, 2018-08-06 12:42:35

How to display full woocommerce menu?

Now I'm displaying the menu in the category like this:

<?php
    // выводим меню подкатегорий
    $cate = get_queried_object();
    $cateID = $cate->term_id;

    $product_categories = woocommerce_get_product_subcategories( $cateID );

    if ( $product_categories ):
    ?>

      <div class="list-group mb-4">
      <?php
      foreach ( $product_categories as $category ):
        wc_get_template( 'content-product_cat.php', array('category' => $category,) );
      endforeach;
      ?>
      </div>

    <?php
    endif;
  ?>

It turns out like this:
5b6817aa5bc7c441259461.png
The subcategories of the category in which I am located are displayed. I need to make it so that on the left there is a column from all categories of the store, with drop-down subcategories. The active subcategory should be highlighted and expanded. In which direction to dig? Where to look for a solution? Maybe there is a solution? Please don't suggest plugins.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton-Pluton, 2018-08-06
@Anton-Pluton

You can make drop-down subcategories using the framework

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question