Scuole
// Register Custom Post Type
function scuole_post_type() {
$labels = array(
'name' => _x( 'Schools', 'Post Type General Name', 'swing_fever_plugin' ),
'singular_name' => _x( 'Scuola', 'Post Type Singular Name', 'swing_fever_plugin' ),
'menu_name' => __( 'Schools', 'swing_fever_plugin' ),
'parent_item_colon' => __( 'Parent School:', 'swing_fever_plugin' ),
'all_items' => __( 'All Schools', 'swing_fever_plugin' ),
'view_item' => __( 'View School', 'swing_fever_plugin' ),
'add_new_item' => __( 'Add New School', 'swing_fever_plugin' ),
'add_new' => __( 'Add New', 'swing_fever_plugin' ),
'edit_item' => __( 'Edit School', 'swing_fever_plugin' ),
'update_item' => __( 'Update School', 'swing_fever_plugin' ),
'search_items' => __( 'Search School', 'swing_fever_plugin' ),
'not_found' => __( 'Not found', 'swing_fever_plugin' ),
'not_found_in_trash' => __( 'Not found in Trash', 'swing_fever_plugin' ),
);
$rewrite = array(
'slug' => 'scuola',
'with_front' => true,
'pages' => true,
'feeds' => true,
);
$args = array(
'label' => __( 'scuola_type', 'swing_fever_plugin' ),
'description' => __( 'Scuole Swing', 'swing_fever_plugin' ),
'labels' => $labels,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
'taxonomies' => array( 'categoria-scuole', 'posizione' ),
'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' => 'dashicons-groups',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'rewrite' => $rewrite,
'capability_type' => 'page',
);
register_post_type( 'scuola_type', $args );
}
// Hook into the 'init' action
add_action( 'init', 'scuole_post_type', 0 );