Woocommerce single product - template by categories

后端 未结 1 1098
挽巷
挽巷 2020-12-11 13:22

Already posted question but not working for me, so I\'m asking a little help guys... ;)

There is my single-product.php (woocommerce file line:28)

相关标签:
1条回答
  • 2020-12-11 13:55

    It's looking for a file titled content-single-product-customcateg.php

    That file doesn't exist so it's falling back to the default.

    if ( has_term( 'customcateg', 'product_cat' ) ) {
        woocommerce_get_template_part( 'content', 'single-product-customcateg' );
    } else {
        woocommerce_get_template_part( 'content', 'single-product' );
    }
    

    Can you add the contents of your content-single-product-customcateg.php by the way?

    0 讨论(0)
提交回复
热议问题