Eventos
if ( ! function_exists('eventos_post_type') ) {
// Register Custom Post Type
function eventos_post_type() {
$labels = array(
'name' => 'Eventos',
'singular_name' => 'Evento',
'menu_name' => 'Eventos',
'name_admin_bar' => 'Evento',
'archives' => 'Arquivo de Eventos',
'attributes' => 'Atributos do Evento',
'parent_item_colon' => 'Parent Item:',
'all_items' => 'Todos os Eventos',
'add_new_item' => 'Adicionar Evento',
'add_new' => 'Adicionar Novo',
'new_item' => 'Novo Evento',
'edit_item' => 'Editar Evento',
'update_item' => 'Atualizar Evento',
'view_item' => 'Ver Evento',
'view_items' => 'Ver Eventos',
'search_items' => 'Procurar Evento',
'not_found' => 'Não Encontrado',
'not_found_in_trash' => 'Não Encontrado no Lixo',
'featured_image' => 'Imagem destacada',
'set_featured_image' => 'Definir imagem destacada',
'remove_featured_image' => 'Remover imagem destacada',
'use_featured_image' => 'Usar como imagem destacada',
'insert_into_item' => 'Insert into item',
'uploaded_to_this_item' => 'Uploaded to this item',
'items_list' => 'Items list',
'items_list_navigation' => 'Items list navigation',
'filter_items_list' => 'Filter items list',
);
$args = array(
'label' => 'Evento',
'description' => 'Eventos',
'labels' => $labels,
'supports' => array( 'title' ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-calendar',
'show_in_admin_bar' => false,
'show_in_nav_menus' => false,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'evento', $args );
}
add_action( 'init', 'eventos_post_type', 0 );
}