Shows Post Types
// Register Custom Post Type
function shows_posts_types() {
$labels = array(
'name' => _x( 'Shows', 'Post Type General Name', 'bs' ),
'singular_name' => _x( 'Shows', 'Post Type Singular Name', 'bs' ),
'menu_name' => __( 'Shows', 'bs' ),
'name_admin_bar' => __( 'Shows', 'bs' ),
'parent_item_colon' => __( 'Parent Item:', 'bs' ),
'all_items' => __( 'Todos os Shows', 'bs' ),
'add_new_item' => __( 'Add novo Show', 'bs' ),
'add_new' => __( 'Novo Show', 'bs' ),
'new_item' => __( 'Novo Item', 'bs' ),
'edit_item' => __( 'Editar Item', 'bs' ),
'update_item' => __( 'Atualizar Item', 'bs' ),
'view_item' => __( 'Ver Item', 'bs' ),
'search_items' => __( 'Buscar', 'bs' ),
'not_found' => __( 'Não encontrado', 'bs' ),
'not_found_in_trash' => __( 'Nada encontrado no lixo', 'bs' ),
);
$args = array(
'label' => __( 'shows_types', 'bs' ),
'description' => __( 'Agenda de Shows', 'bs' ),
'labels' => $labels,
'supports' => array( 'title', 'thumbnail', 'custom-fields', ),
'taxonomies' => array( 'category', 'post_tag' ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-format-audio',
'show_in_admin_bar' => true,
'show_in_nav_menus' => true,
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'page',
);
register_post_type( 'shows_types', $args );
}
// Hook into the 'init' action
add_action( 'init', 'shows_posts_types', 0 );