这完全取决于这些类别在主题中的显示方式。
如果做得很好,并且正确使用了WP模板标记,那么该列表来自get_the_category() 函数(所有其他函数都使用此函数)。
在函数的末尾,你可以找到
return apply_filters( \'get_the_categories\', $categories, $id );
 这是一个好消息,因为这意味着,您可以编写自己的过滤器并从列表中删除给定的类别:
function prefix_remove_featured_category_from_post_categories_list( $categories, $id ) {
    // do whatever you want with $categories list
    // for example remove some category from the list
    $categories_to_remove = array(
        \'cat-slug-a\',
        \'cat-slug-b\'
    ); // Array of categories slug to be remove. Put your slugs in here
    foreach ( $categories as $index => $single_cat ) {
        if ( in_array( $single_cat->slug, $categories_to_remove ) ) {
            unset( $categories[ $index ] ); // Remove the category.
        }
    }
    return $categories;
}
add_filter( \'get_the_categories\', \'prefix_remove_featured_category_from_post_categories_list\', 10, 2 );