Skip to content

Instantly share code, notes, and snippets.

@jhned
Created February 5, 2013 20:40
Show Gist options
  • Save jhned/4717456 to your computer and use it in GitHub Desktop.
Save jhned/4717456 to your computer and use it in GitHub Desktop.
Example of a rewrite rule for a custom taxonomy.
register_taxonomy('type', 'work', array(
'labels' => array(
'name' => 'Types'
, 'singular_name' => 'Type'
, 'search_items' => 'Search Types'
, 'edit_item' => 'Edit Type'
, 'add_new_item' => 'Add New Type'
)
, 'hierarchical' => true
, 'query_var' => true
, 'rewrite' => array('slug' => 'work/type', 'with_front' => false)
)); // type taxonomy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment