你是说这样的事吗?
 $args = array( \'labels\' => $labels,
        \'public\' => true,
        \'publicly_queryable\' => true,
        \'show_ui\' => true,
        \'query_var\' => true,
        \'rewrite\' => true,
        \'capability_type\' => \'post\',
        \'hierarchical\' => false,
        \'menu_position\' => null,
        \'supports\' => array( \'title\', \'editor\', \'author\', \'thumbnail\', \'excerpt\', \'comments\' )
    );
 此代码位于创建CPT的函数之后,register\\u post\\u类型之前
i、 e。
function my_custom_post () {
...
}
$args = array (...)
);
register_post_type ($cpt, $args);