-1
我有問題,並希望在明年woocomerce產品展示: 1(第一產品)4(例如總數)等2的4 ...如何在woocomerce中添加產品的索引號?
我有產品總計數,但如何顯示它有哪些索引號我不知道。
function currentnumber(){
global $post;
$cat = get_the_terms($post->ID, 'product_cat');
$key = $cat[0]->term_taxonomy_id;
$newcat = $cat[0]->count;
return $newcat;
};
請查看下面的截圖,以便更好地理解。