Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post Type Generator – RHCD

Post Type Generator – RHCD

// Register Custom Post Type
function custom_post_type() {

	$labels = array(
		'name'                  => 'Capítulos',
		'singular_name'         => 'Capítulo',
		'menu_name'             => 'RHCd',
		'name_admin_bar'        => 'RHCd',
		'archives'              => 'Item Archives',
		'attributes'            => 'Item Attributes',
		'parent_item_colon'     => 'Parent Item:',
		'all_items'             => 'Todos los capítulos',
		'add_new_item'          => 'Añadir nuevo capítulo',
		'add_new'               => 'Añadir nuevo',
		'new_item'              => 'Nuevo',
		'edit_item'             => 'Editar',
		'update_item'           => 'Cambiar',
		'view_item'             => 'Ver',
		'view_items'            => 'Ver',
		'search_items'          => 'Buscar',
		'not_found'             => 'No encontrado',
		'not_found_in_trash'    => 'No encontrado en la papelera',
		'featured_image'        => 'Featured Image',
		'set_featured_image'    => 'Establecer featured image',
		'remove_featured_image' => 'Borrar featured image',
		'use_featured_image'    => 'Utilizar como featured image',
		'insert_into_item'      => 'Insertar en el item',
		'uploaded_to_this_item' => 'Descargar este item',
		'items_list'            => 'Lista',
		'items_list_navigation' => 'Navegación',
		'filter_items_list'     => 'Filtrar',
	);
	$args = array(
		'label'                 => 'Capítulo',
		'description'           => 'Post Type Description',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
		'taxonomies'            => array( 'seccion' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-home',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
	);
	register_post_type( 'rhcd', $args );

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