0
我試圖用自定義分類來隱藏自定義文章中的「Gyming」類別。試圖很難得到結果,但不幸的是它沒有與以下代碼一起工作。刪除Wordpress中的特定類別
function cat_subcat(){
$thetax = 'product';
$args = array(
'taxonomy' => 'product',
//'parent' => 0,
'hierarchical'=>true,
'order'=> 'ASC',
'show_count'=>false,
'show_option_all'=>'',
'child_of'=>0,
'depth'=>3,
'title_li'=>'',
'show_option_none' => __('No categories'),
);
echo '<ul class="category">';
wp_list_categories($args);
echo '</ul>';
}
善意的建議。
我的類別ID爲8個,不包括行被添加,但仍其展示'Gyming'類別。 –
https://muhammadisteel.com.pk/product/cooking-line/ –
它完成了。謝謝你的協助。 –