我在函数中生成了一个自定义的post类型。php。我希望每个帖子都是一个页面,而不是一篇帖子。我怎样才能改变这个?我尝试将“capability\\u type”=>“post”更改为“capability\\u type”=>“page”,但这不起作用。
// LFIO: Custom post type: Case Results
add_action( \'init\', \'register_cpt_result\' );
function register_cpt_result() {
$labels = array(
\'name\' => _x( \'Case Results\', \'result\' ),
\'singular_name\' => _x( \'Result\', \'result\' ),
\'add_new\' => _x( \'Add New\', \'result\' ),
\'add_new_item\' => _x( \'Add New Result\', \'result\' ),
\'edit_item\' => _x( \'Edit Result\', \'result\' ),
\'new_item\' => _x( \'New Result\', \'result\' ),
\'view_item\' => _x( \'View Result\', \'result\' ),
\'search_items\' => _x( \'Search Case Results\', \'result\' ),
\'not_found\' => _x( \'No case results found\', \'result\' ),
\'not_found_in_trash\' => _x( \'No case results found in Trash\', \'result\' ),
\'parent_item_colon\' => _x( \'Parent Result:\', \'result\' ),
\'menu_name\' => _x( \'Case Results\', \'result\' ),
);
$args = array(
\'labels\' => $labels,
\'hierarchical\' => true,
\'description\' => \'My firm\\\'s case results\',
\'supports\' => array( \'title\', \'editor\', \'excerpt\' ),
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'show_in_nav_menus\' => true,
\'publicly_queryable\' => true,
\'exclude_from_search\' => true,
\'has_archive\' => true,
\'query_var\' => true,
\'can_export\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\'
);
register_post_type( \'result\', $args );
}