істок-маршрути
// Register Custom Post Type
function add_routes_cpt() {
$labels = array(
'name' => 'Маршрут',
'singular_name' => 'Маршрути',
'menu_name' => 'Маршрути',
'name_admin_bar' => 'Маршрути',
'parent_item_colon' => '',
'all_items' => 'Всі маршрути',
'add_new_item' => 'Додати новий маршрут',
'add_new' => 'Додати новий',
'new_item' => 'Новий',
'edit_item' => 'Редагувати',
'update_item' => 'Оновити',
'view_item' => 'Переглянути',
'search_items' => 'Знайти',
'not_found' => 'Не знайдено',
'not_found_in_trash' => 'Не знайдено в Кошику',
);
$args = array(
'label' => 'route',
'description' => 'Маршрути',
'labels' => $labels,
'supports' => array( 'title', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-share',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'route', $args );
}
// Hook into the 'init' action
add_action( 'init', 'add_routes_cpt', 0 );