Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

stanislavdental-subscribes

// Register Custom Post Type
function add_subscribes_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'    => 'Не знайдено в Кошику',
		'items_list'            => 'Items list',
		'items_list_navigation' => 'Items list navigation',
		'filter_items_list'     => 'Filter items list',
	);
	$rewrite = array(
		'slug'                  => 'subscribes',
		'with_front'            => false,
		'pages'                 => true,
		'feeds'                 => false,
	);
	$args = array(
		'label'                 => 'Підписник',
		'description'           => 'Підписники',
		'labels'                => $labels,
		'supports'              => array( 'title', ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-email-alt',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => false,		
		'exclude_from_search'   => true,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
	);
	register_post_type( 'subscribes', $args );

}
add_action( 'init', 'add_subscribes_cpt', 0 );