尽管“name”被定义为句子大小写,但我的自定义帖子类型存档标题是否都是小写的?
下面是我正在使用的post类型函数:
function resources_post_type() {
$labels = array(
\'name\' => _x( \'Resources, Help & Support\', \'post type general name\' ),
\'singular_name\' => _x( \'Resource\', \'post type singular name\' ),
\'add_new\' => _x( \'Add New\', \'resources\' ),
\'add_new_item\' => __( \'Add New Resource\' ),
\'edit_item\' => __( \'Edit Resource\' ),
\'new_item\' => __( \'New Resource\' ),
\'all_items\' => __( \'All Resources\' ),
\'view_item\' => __( \'View Resource\' ),
\'search_items\' => __( \'Search Resources\' ),
\'not_found\' => __( \'No resources found\' ),
\'not_found_in_trash\' => __( \'No resources found in the Trash\' ),
\'parent_item_colon\' => \'\',
\'menu_name\' => \'Resources\'
);
$args = array(
\'labels\' => $labels,
\'description\' => \'Holds our resources and resource specific data\',
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'query_var\' => true,
\'menu_position\' => 5,
\'has_archive\' => true,
\'rewrite\' => array( \'slug\' => \'resources\' ),
\'supports\' => array(
\'title\',
\'editor\',
\'author\',
\'thumbnail\',
\'excerpt\'
)
);
register_post_type( \'resources\', $args );
add_action(\'admin_init\', \'flush_rewrite_rules\');
}添加操作(\'init\',\'resources\\u post\\u type\',0);
我用的是论文2.0