News
// Register Custom Post Type
function zaib_noticias() {
$labels = array(
'name' => _x( 'Notícias', 'Post Type General Name', 'zaibserver' ),
'singular_name' => _x( 'Notícia', 'Post Type Singular Name', 'zaibserver' ),
'menu_name' => __( 'Notícias', 'zaibserver' ),
'name_admin_bar' => __( 'Notícias', 'zaibserver' ),
'parent_item_colon' => __( 'Notícia principal', 'zaibserver' ),
'all_items' => __( 'Notícias', 'zaibserver' ),
'add_new_item' => __( 'Cadastrar', 'zaibserver' ),
'add_new' => __( 'Adicionar nova', 'zaibserver' ),
'new_item' => __( 'Nova notícia', 'zaibserver' ),
'edit_item' => __( 'Editar notícia', 'zaibserver' ),
'update_item' => __( 'Atualizar notícia', 'zaibserver' ),
'view_item' => __( 'Ver notícia', 'zaibserver' ),
'search_items' => __( 'Pesquisar notícia', 'zaibserver' ),
'not_found' => __( 'Item não encontrado', 'zaibserver' ),
'not_found_in_trash' => __( 'Item não encontrado na lixeira', 'zaibserver' ),
);
$rewrite = array(
'slug' => 'noticia',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'Notícia', 'zaibserver' ),
'description' => __( 'Páginas de Notícias', 'zaibserver' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => true,
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-rss',
'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' => 'page',
);
register_post_type( 'znoticias', $args );
}
add_action( 'init', 'zaib_noticias', 0 );