Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post Type Galeria

Post type para exibição de galeria

// Register Custom Post Type
function rs_post_galeria() {

	$labels = array(
		'name'                => _x( 'Galerias', 'Post Type General Name', 'base_rs' ),
		'singular_name'       => _x( 'Galeria', 'Post Type Singular Name', 'base_rs' ),
		'menu_name'           => __( 'Fotos Home', 'base_rs' ),
		'parent_item_colon'   => __( 'Item principal', 'base_rs' ),
		'all_items'           => __( 'Todos os Itens', 'base_rs' ),
		'view_item'           => __( 'Ver Galeria', 'base_rs' ),
		'add_new_item'        => __( 'Adicionar novas Fotos', 'base_rs' ),
		'add_new'             => __( 'Adicionar Novas', 'base_rs' ),
		'edit_item'           => __( 'editar Fotos', 'base_rs' ),
		'update_item'         => __( 'Atualizar fotos', 'base_rs' ),
		'search_items'        => __( 'Buscar fotos', 'base_rs' ),
		'not_found'           => __( 'Nada encontrado', 'base_rs' ),
		'not_found_in_trash'  => __( 'Nada encontrado na lixeira', 'base_rs' ),
	);
	$args = array(
		'label'               => __( 'rs_type_galeria', 'base_rs' ),
		'description'         => __( 'Exibição de fotos na Homepage', 'base_rs' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'thumbnail', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'show_in_nav_menus'   => true,
		'show_in_admin_bar'   => true,
		'menu_position'       => 5,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'capability_type'     => 'page',
	);
	register_post_type( 'rs_type_galeria', $args );

}

// Hook into the 'init' action
add_action( 'init', 'rs_post_galeria', 0 );