从类别列表中排除特定类别


Exclude specific categories from category list

下面是本页显示的类别列表的代码

http://www.surefiresearch.com/blog/

我想删除类别'page-seo'和'page-seo-1'。我正在尝试'exclude=cat_id'这已经防止实际的帖子显示在这个页面上,但它不工作的类别列表。

有人能看出我做错了什么吗?

欢呼。

$taxonomy = 'category';
// get the term IDs assigned to post.
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
// separator between links
$separator = ', ';
if ( !empty( $post_terms ) && !is_wp_error( $post_terms ) ) {
    $term_ids = implode( ',' , $post_terms );
    $terms = wp_list_categories( 'title_li=&style=none&echo=0&taxonomy=' . $taxonomy . '&include=' . $term_ids . '&exclude=66,67');
    $terms = rtrim( trim( str_replace( '
    ', $separator, $terms ) ), $separator );
    // display post categories
    echo $terms;
}

这就是我要找的,排除命令已经工作

wp_list_categories("orderby = name& show_count = 1,排除= 66,67,68,69,70,71,title_li = ');