可能您的CPT名称需要更改
blogpost
 您还可以添加分类法类型支持
add_action( \'init\', \'add_type_taxonomy\' );
function add_type_taxonomy() {
register_taxonomy( \'cpt-type\', \'cpt\',
    array(
        \'labels\' => array(
            \'name\'          => _x( \'Types\', \'taxonomy general name\', \'theme\' ),
            \'add_new_item\'  => __( \'Add New CPT Type\', \'theme\' ),
            \'new_item_name\' => __( \'New CPT Type\', \'theme\' ),
        ),
        \'exclude_from_search\' => true,
        \'has_archive\'         => true,
        \'hierarchical\'        => true,
        \'rewrite\'             => array( \'slug\' => \'cpt-type\', \'with_front\' => false ),
        \'show_ui\'             => true,
        \'show_tagcloud\'       => false,
    )
);
}
 用自定义帖子类型的名称替换cpt和cpt的所有实例。
您还可以在注册CPT的代码中更改这一行代码:
\'taxonomies\'   => array( \'category\' ),
 如果您想要分类法而不是类别,请使用此行
\'taxonomies\'   => array( \'cpt-type\' ),
 其中cpt是自定义帖子类型的名称