Skip to content

Instantly share code, notes, and snippets.

@grok
Created Jan 6, 2016
Embed
What would you like to do?
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