第二部门+;Woocommerce Shop Module=显示没有问题的产品工作代码段的类别?

第二部门+;Woocommerce Shop Module=显示没有问题的产品工作代码段的类别?,woocommerce,module,categories,shop,divi,Woocommerce,Module,Categories,Shop,Divi,ET不包括店铺模块上类别显示的开/关功能,因此这里是…add\u操作('woocommerce\u在店铺循环项目标题之后','woocommerce\u在店铺循环项目标题之后',1); add_action( 'woocommerce_after_shop_loop_item_title', 'after_shop_loop_item_title', 1 ); function after_shop_loop_item_title() { global $post; $terms =

ET不包括店铺模块上类别显示的开/关功能,因此这里是…

add\u操作('woocommerce\u在店铺循环项目标题之后','woocommerce\u在店铺循环项目标题之后',1);
add_action( 'woocommerce_after_shop_loop_item_title', 'after_shop_loop_item_title', 1 );
function after_shop_loop_item_title() {
   global $post;
   $terms = get_the_terms( $post->ID, 'product_cat' ); 
   foreach ($terms as $term) {
       $term_link = get_term_link( $term );
       echo '<span> <a href="' . esc_url( $term_link ) . '">' .$term->name .'</a> </span>';
   }
}
车间循环项目标题()后的函数{ 全球$员额; $terms=get_the_terms($post->ID,'product_cat'); foreach($terms作为$term){ $term\u link=get\u term\u link($term); 回声'; } }