my first snippet of custom post
It’s a first try to use gengerateor
// Register Custom Post Type function create_ai_custom_post() { $labels = array( 'name' => 'お知らせ入力', 'singular_name' => 'お知らせ入力', 'menu_name' => 'お知らせ入力', 'name_admin_bar' => 'お知らせ入力', 'archives' => 'お知らせ一覧', 'attributes' => 'Item Attributes', 'parent_item_colon' => 'Parent Item:', 'all_items' => 'お知らせ一覧', 'add_new_item' => '新規入力', 'add_new' => '新規作成', 'new_item' => '新規', 'edit_item' => '編集', 'update_item' => '更新', 'view_item' => '表示', 'view_items' => '入力確認', 'search_items' => '検索', 'not_found' => '該当なし', 'not_found_in_trash' => 'ごみ箱にも該当なし', 'featured_image' => 'Featured Image', 'set_featured_image' => 'Set featured image', 'remove_featured_image' => 'Remove featured image', 'use_featured_image' => 'Use as featured image', 'insert_into_item' => 'Insert into item', 'uploaded_to_this_item' => 'Uploaded to this item', 'items_list' => 'Items list', 'items_list_navigation' => 'Items list navigation', 'filter_items_list' => 'Filter items list', ); $rewrite = array( 'slug' => 'info', 'with_front' => true, 'pages' => false, 'feeds' => false, ); $args = array( 'label' => 'お知らせ入力', 'description' => 'Post Type Description', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-post', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => true, 'query_var' => 'post_type', 'rewrite' => $rewrite, 'capability_type' => 'page', 'show_in_rest' => false, ); register_post_type( 'ai_custom_post', $args ); } add_action( 'init', 'create_ai_custom_post', 0 );