Created
January 6, 2016 17:16
-
-
Save grok/c1513267ea7001796a4a to your computer and use it in GitHub Desktop.
Example of permalink taxonomies.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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