Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post: Audio Clip

if ( ! function_exists('audio_clip_post_type') ) {

// Register Custom Post Type
function audio_clip_post_type() {

	$labels = array(
		'name'                => _x( 'Audio Clips', 'Post Type General Name', 'sage' ),
		'singular_name'       => _x( 'Audio Clip', 'Post Type Singular Name', 'sage' ),
		'menu_name'           => __( 'Audio Clip', 'sage' ),
		'name_admin_bar'      => __( 'Audio Clip', 'sage' ),
		'parent_item_colon'   => __( 'Parent Audio:', 'sage' ),
		'all_items'           => __( 'All Audio Clips', 'sage' ),
		'add_new_item'        => __( 'Add New Audio', 'sage' ),
		'add_new'             => __( 'Add New', 'sage' ),
		'new_item'            => __( 'New Audio Clip', 'sage' ),
		'edit_item'           => __( 'Edit Audio', 'sage' ),
		'update_item'         => __( 'Update Audio', 'sage' ),
		'view_item'           => __( 'View Audio', 'sage' ),
		'search_items'        => __( 'Search Clip', 'sage' ),
		'not_found'           => __( 'Not found', 'sage' ),
		'not_found_in_trash'  => __( 'Not found in Trash', 'sage' ),
	);
	$args = array(
		'label'               => __( 'audio-clip', 'sage' ),
		'description'         => __( 'Options to add audio clips to website', 'sage' ),
		'labels'              => $labels,
		'supports'            => array( 'title', ),
		'taxonomies'          => array( 'audio-clip-category' ),
		'hierarchical'        => false,
		'public'              => false,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 5,
		'menu_icon'           => 'dashicons-album',
		'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( 'audio-clip', $args );

}

// Hook into the 'init' action
add_action( 'init', 'audio_clip_post_type', 0 );

}