请立即检查工作代码自定义帖子和类别
function team_custome_post(){
$labels = array(
\'name\' => __(\'Teams\', \'team\'),
\'singular_name\' => __(\'Teams \', \'team\'),
\'add_new\' => __(\'New Teams \', \'team\'),
\'add_new_item\' => __(\'Add new Teams \', \'team\'),
\'edit_item\' => __(\'Edit Teams \', \'team\'),
\'new_item\' => __(\'New Teams \', \'team\'),
\'view_item\' => __(\'View Teams \', \'team\'),
\'search_item\' => __(\'Search Teams \', \'team\'),
\'not_found\' => __(\'No The Teams Found\', \'team\'),
\'not_found_in_trash\' => __(\'No The Teams found in trash\', \'team\')
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'menu_icon\' => \'dashicons-groups\',
\'supports\' => array(
\'title\',
\'editor\',
\'thumbnail\'
),
);
register_taxonomy(
\'teamcategory\',
\'team\',
array(
\'label\' => __( \'Teams Category\' ),
\'rewrite\' => array( \'slug\' => \'teamcategory\' ),
\'hierarchical\' => true,
)
);
register_post_type(\'team\', $args);
}
add_action(\'init\', \'team_custome_post\' );