Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Leggenda branches

Branches post type for Leggenda.co.il

// Register Custom Post Type
function leggenda_branches() {

	$labels = array(
		'name'                  => _x( 'Branches', 'Post Type General Name', 'leggenda' ),
		'singular_name'         => _x( 'Branche', 'Post Type Singular Name', 'leggenda' ),
		'menu_name'             => __( 'Branches', 'leggenda' ),
		'name_admin_bar'        => __( 'Branche', 'leggenda' ),
		'archives'              => __( 'Item Archives', 'leggenda' ),
		'parent_item_colon'     => __( 'Parent Item:', 'leggenda' ),
		'all_items'             => __( 'All Items', 'leggenda' ),
		'add_new_item'          => __( 'Add New Item', 'leggenda' ),
		'add_new'               => __( 'Add New', 'leggenda' ),
		'new_item'              => __( 'New Item', 'leggenda' ),
		'edit_item'             => __( 'Edit Item', 'leggenda' ),
		'update_item'           => __( 'Update Item', 'leggenda' ),
		'view_item'             => __( 'View Item', 'leggenda' ),
		'search_items'          => __( 'Search Item', 'leggenda' ),
		'not_found'             => __( 'Not found', 'leggenda' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'leggenda' ),
		'featured_image'        => __( 'Featured Image', 'leggenda' ),
		'set_featured_image'    => __( 'Set featured image', 'leggenda' ),
		'remove_featured_image' => __( 'Remove featured image', 'leggenda' ),
		'use_featured_image'    => __( 'Use as featured image', 'leggenda' ),
		'insert_into_item'      => __( 'Insert into item', 'leggenda' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'leggenda' ),
		'items_list'            => __( 'Items list', 'leggenda' ),
		'items_list_navigation' => __( 'Items list navigation', 'leggenda' ),
		'filter_items_list'     => __( 'Filter items list', 'leggenda' ),
	);
	$args = array(
		'label'                 => __( 'Branche', 'leggenda' ),
		'description'           => __( 'Leggenda branches post type.', 'leggenda' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 20,
		'menu_icon'             => 'dashicons-admin-multisite',
		'show_in_admin_bar'     => false,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'branches', $args );

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