我使用此代码来显示自定义职位分类层次,一切工作到现在很好,但我想实现也是显示这些类别为纯文本(没有<a href="..."
)。谁能帮忙?显示自定义职位类别作为计划文本
$taxonomy = 'produkte_kategorie'; // change this to your taxonomy
$terms = wp_get_post_terms($post->ID, $taxonomy, array("fields" => "ids"));
if($terms) {
echo '<ul class="p-kategorie">';
$terms = trim(implode(',', (array) $terms), ' ,');
wp_list_categories('title_li=&taxonomy=' . $taxonomy . '&include=' . $terms);
echo '</ul>';
}
我收到此错误:解析错误:语法错误,意外'=>'(T_DOUBLE_ARROW) – gencdoda
忘了传数组,加入代码 –