1

I am looking to display a list of product categories in the shop loop.

Parent Term | Child Term | Child Term

I have tried wp_list_categories() but this breaks the links and puts in duplicates of the product links in the

    <ul>
    <a href="example.com/product/bb-glow/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"> </a>
    <li class="cat-item cat-item-39">
    <a href="example.com/product/bb-glow/" class="woocommerce-LoopProduct-link woocommerce-loop-product__link"></a>
    <a href="example.com/product-category/online-courses/">Online Courses</a>
        <ul class="children">
            <li class="cat-item cat-item-43"><a href="example.com/product-category/online-courses/micropigmentation/">Micropigmentation</a>
            </li>
            <li class="cat-item cat-item-37"><a href="example.com/product-category/online-courses/semi-permanent-makeup/">Semi-permanent Makeup</a>
            </li>
        </ul>
    </li>
    
1
  • Hi, just a heads up. A lot of the community consider woo-commerce to be off-topic. You might get some answers but they will likely be a bit slow. Mar 14, 2021 at 12:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.