0
我是新的WordPress和我想創建一個自定義職位類型的會話與slu「」會議「的自定義分類,我得到500內部服務器錯誤與我的代碼,我錯過了什麼這裏 ?註冊新的帖子類型返回500錯誤
function session_post_type(){
$labels = array(
'name' => 'Session',
'singular_name' => 'Session',
'add_new' => 'Add Item',
'all_items' => 'All Items',
'edit_item' => 'Edit Item',
'view_item' => 'View Item',
'search_item' => 'Search Item',
'not_found' => 'No items found'
);
$args = array(
'labels' = $labels,
'public' => true,
'has_archive' => true,
'taxonomies' => array('category', 'post_tag'),
'menu_position' => 5,
'exclude_from_search' => false
);
/*
* now register the session type with slug 'sessions'
*/
register_post_type('sessions',$args);
}
/*
* the hook that will create the session type when the them is loaded (when 'init' is executed)
*/
add_action('init', 'session_post_type');
謝謝你,我錯過了:/ – bourax