Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Projectes

Projectes MBranding

// Register Custom Post Type
function cpt_projectes() {

	$labels = array(
		'name'                  => _x( 'Projectes', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Projecte', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Projectes', 'text_domain' ),
		'name_admin_bar'        => __( 'Projectes', 'text_domain' ),
		'archives'              => __( 'Llistat de projectes', 'text_domain' ),
		'attributes'            => __( 'Aributs', 'text_domain' ),
		'parent_item_colon'     => __( 'Projecte superior', 'text_domain' ),
		'all_items'             => __( 'Tots els projectes', 'text_domain' ),
		'add_new_item'          => __( 'Afegir nou projecte', 'text_domain' ),
		'add_new'               => __( 'Afegir', 'text_domain' ),
		'new_item'              => __( 'Nou projecte', 'text_domain' ),
		'edit_item'             => __( 'Editar', 'text_domain' ),
		'update_item'           => __( 'Actualitzar', 'text_domain' ),
		'view_item'             => __( 'Veure el', 'text_domain' ),
		'view_items'            => __( 'Veure els projectes', 'text_domain' ),
		'search_items'          => __( 'Buscar', 'text_domain' ),
		'not_found'             => __( 'Cap projecte', 'text_domain' ),
		'not_found_in_trash'    => __( 'Cap projecte a la paperera', 'text_domain' ),
		'featured_image'        => __( 'Imatge del projecte', 'text_domain' ),
		'set_featured_image'    => __( 'Establir imaatge', 'text_domain' ),
		'remove_featured_image' => __( 'Eliminar imatge', 'text_domain' ),
		'use_featured_image'    => __( 'Utilitzar imatge', 'text_domain' ),
		'insert_into_item'      => __( 'Insertar imatge', 'text_domain' ),
		'uploaded_to_this_item' => __( 'Pujat el projecte', 'text_domain' ),
		'items_list'            => __( 'Llista de projectes', 'text_domain' ),
		'items_list_navigation' => __( 'Llistat de projectes', 'text_domain' ),
		'filter_items_list'     => __( 'Filtrar per projectes', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Projecte', 'text_domain' ),
		'description'           => __( 'Projectes', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-portfolio',
		'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'       => 'page',
		'show_in_rest'          => true,
	);
	register_post_type( 'cpt_projectes', $args );

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