Skip to content

Instantly share code, notes, and snippets.

@grok
Created January 6, 2016 17:16
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 grok/c1513267ea7001796a4a to your computer and use it in GitHub Desktop.
Save grok/c1513267ea7001796a4a to your computer and use it in GitHub Desktop.
Example of permalink taxonomies.
<?php
add_action( 'init', 'create_model_taxonomy' );
function create_model_taxonomy() {
register_taxonomy(
'model',
'resource', // Might need to change this if the CPT has a different name.
array(
'label' => __( 'Tanel\'s Model' ),
'rewrite' => array( 'slug' => 'model' ),
)
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment