Support » Plugin: WooCommerce » Unable to locate template for product's categories

  • Hi,

    I’m looking for template for category pages of the product but so far I’m unable to find the right template file for it. I’ve tried ‘taxonomy-product_cat.php’ but it didn’t work. I googled it a lot, also read various threads on wordpress.org but so far unable to find the right answer? Any help would be highly appreciated.

    Thanks

    https://wordpress.org/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Bryan, you can override archive-product.php, which is the template for displaying product archives, including the main shop page and category page.

    To override this template by copying it to yourtheme/woocommerce/archive-product.php

    FYI, another template for displaying product category thumbnails within loops is content-product_cat.php.

    Hope it helps 🙂

    Thread Starter Bryan

    (@bryaatfas)

    Hi Terrytsang,

    Thank you for your message but i tried all three files (taxonomy-product_cat.php , archive-product.php & content-product_cat.php) but neither of them worked 🙁

    Whatever template it is it is generating this div:
    <div class=”term-description”>

    Which I looked into code of all template files but couldn’t find out.

    i found the file that generated that part of code (woocommerce/includes/wc-template-functions.php)

    You can override that function by putting below code into yout theme functions.php:

    function woocommerce_taxonomy_archive_description() {
      //write your custom code below
    
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to locate template for product's categories’ is closed to new replies.