post_type_blog
// Register Custom Post Type
function post_type_blog() {
$labels = array(
'name' => _x( 'Blogs', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Blog', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Blog', 'text_domain' ),
'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),
'all_items' => __( 'Todos os Itens', 'text_domain' ),
'view_item' => __( 'Ver item', 'text_domain' ),
'add_new_item' => __( 'Adicionar novo item', 'text_domain' ),
'add_new' => __( 'Adicionar novo', 'text_domain' ),
'edit_item' => __( 'Editar item', 'text_domain' ),
'update_item' => __( 'Atualizar item', 'text_domain' ),
'search_items' => __( 'Buscar item', 'text_domain' ),
'not_found' => __( 'Não encontrado', 'text_domain' ),
'not_found_in_trash' => __( 'Não encontrado no lixo', 'text_domain' ),
);
$rewrite = array(
'slug' => 'blog',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'post_type_blog', 'text_domain' ),
'description' => __( 'Post Type Blog', 'text_domain' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ),
'taxonomies' => array( 'category', 'post_tag', 'blog' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'http://www.renatosiqueira.com.br/wp-content/imagens/post_type_blog.png',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'post',
);
register_post_type( 'post_type_blog', $args );
}
// Hook into the 'init' action
add_action( 'init', 'post_type_blog', 0 );