Работы
Для портфолио на 2head
// Register Custom Post Type function custom_post_type_works() { $labels = array( 'name' => 'Работы', 'singular_name' => 'Работа', 'menu_name' => 'Портфолио', 'name_admin_bar' => 'Портфолио', 'archives' => 'Item Archives', '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' => 'Search Item', 'not_found' => 'Не найдено', 'not_found_in_trash' => 'Не найдено в корзине', 'featured_image' => 'Миниатюра', 'set_featured_image' => 'Set featured image', 'remove_featured_image' => 'Удалить загруженное изображение', 'use_featured_image' => 'Использовать загруженное изображение', 'insert_into_item' => 'Вставить в работу', 'uploaded_to_this_item' => 'Загружено в этот пункт', 'items_list' => 'Список работ', 'items_list_navigation' => 'Items list navigation', 'filter_items_list' => 'Filter items list', ); $rewrite = array( 'slug' => 'works', 'with_front' => true, 'pages' => false, 'feeds' => true, ); $args = array( 'label' => 'Работа', 'description' => 'Портфолио', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-id-alt', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'query_var' => 'works', 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'ajax_works', $args ); } add_action( 'init', 'custom_post_type_works', 0 );