Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Eventos

// Register Custom Post Type
function eventos_post_type() {

	$labels = array(
		'name'                  => _x( 'Eventos', 'Post Type General Name', 'nw2' ),
		'singular_name'         => _x( 'Evento', 'Post Type Singular Name', 'nw2' ),
		'menu_name'             => __( 'Eventos', 'nw2' ),
		'name_admin_bar'        => __( 'Eventos', 'nw2' ),
		'parent_item_colon'     => __( 'Evento relacionado', 'nw2' ),
		'all_items'             => __( 'Todos os eventos', 'nw2' ),
		'add_new_item'          => __( 'Adicionar novo Evento', 'nw2' ),
		'add_new'               => __( 'Adicionar Evento', 'nw2' ),
		'new_item'              => __( 'Novo evento', 'nw2' ),
		'edit_item'             => __( 'Editar evento', 'nw2' ),
		'update_item'           => __( 'Atualizar evento', 'nw2' ),
		'view_item'             => __( 'Ver evento', 'nw2' ),
		'search_items'          => __( 'Procurar evento', 'nw2' ),
		'not_found'             => __( 'Não encontrado', 'nw2' ),
		'not_found_in_trash'    => __( 'Nada encontrado na lixeira', 'nw2' ),
		'items_list'            => __( 'Items list', 'nw2' ),
		'items_list_navigation' => __( 'Items list navigation', 'nw2' ),
		'filter_items_list'     => __( 'Filter items list', 'nw2' ),
	);
	$rewrite = array(
		'slug'                  => 'eventos-em-joinville',
		'with_front'            => true,
		'pages'                 => true,
		'feeds'                 => true,
	);
	$args = array(
		'label'                 => __( 'Evento', 'nw2' ),
		'description'           => __( 'Eventos do Joincult', 'nw2' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'author', 'thumbnail', 'trackbacks', 'revisions', 'custom-fields', 'post-formats', ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'rewrite'               => $rewrite,
		'capability_type'       => 'post',
	);
	register_post_type( 'eventos', $args );

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