Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created December 7, 2011 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/1444017 to your computer and use it in GitHub Desktop.
Save billerickson/1444017 to your computer and use it in GitHub Desktop.
<?php
/**
* Create Taxonomies
*
* @link http://codex.wordpress.org/Function_Reference/register_taxonomy
*
*/
function be_register_taxonomy() {
register_taxonomy(
'code-tag',
'code',
array(
'hierarchical' => false,
'labels' => array(
'name' => 'Code Tags',
'singular_name' => 'Code Tag'
),
'query_var' => true,
'rewrite' => array( 'slug' => 'code-tag' )
)
);
}
add_action( 'init', 'be_register_taxonomy' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment