Function: tcp create custom taxonomy

Description

Creates a Custom Taxonomy definitions.

Usage

<?php echo tcp_create_custom_taxonomies( $taxonomy_id ); ?>

Parameters

$taxonomy_id
(String) The custom taxonomy id you’d like to create.
$taxonomy_def
(Array) The custom taxonomy definition. Visit this link to read more info about the definition fields .

Examples

<?php $def = array(
	'name'					=> __( 'Products', 'tcp' ),
	'desc'					=> __( 'Default post type for TheCartPress'),
	'activate'				=> true,
	'singular_name'			=> __( 'Product', 'tcp' ),
	'add_new'				=> __( 'Add New', 'tcp' ),
	'add_new_item'			=> __( 'Add New', 'tcp' ),
	'edit_item'				=> __( 'Edit Product', 'tcp' ),
	'new_item'				=> __( 'New Product', 'tcp' ),
	'view_item'				=> __( 'View Product', 'tcp' ),
	'search_items'			=> __( 'Search Products', 'tcp' ),
	'not_found'				=> __( 'No products found', 'tcp' ),
	'not_found_in_trash'	=> __( 'No products found in Trash', 'tcp' ),
	'public'				=> true,
	'show_ui'				=> true,
	'show_in_menu'			=> true,
	'can_export'			=> true,
	'show_in_nav_menus'		=> true,
	'query_var'				=> true,
	'supports'				=> array( 'title', 'excerpt', 'editor', 'thumbnail', 'comments' ),
	'rewrite'				=> 'product',
	'has_archive'			=> 'product',
	'is_saleable'			=> true,
);
tcp_create_custom_post_type( TCP_PRODUCT_POST_TYPE, $def );?>

Change Log

Since: 1.1.7

Related

tcp_get_custom_taxonomies | tcp_get_custom_taxonomies | tcp_get_custom_taxonomy | tcp_exist_custom_taxonomy | tcp_update_custom_taxonomy | tcp_delete_custom_taxonomy