Created
August 28, 2016 07:59
-
-
Save hemusyl/ea5d82c8fe847aba8f55529ac974f524 to your computer and use it in GitHub Desktop.
Taxonomy
This file contains hidden or 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 | |
function versiontwos_taxonomy() { | |
register_taxonomy( | |
'filter', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces). | |
'portfolio', //post type name | |
array( | |
'hierarchical' => true, | |
'label' => 'Portfolio Category', //Display name | |
'query_var' => true, | |
'show_admin_column' => true, | |
'rewrite' => array( | |
'slug' => 'Portfolio-category', // This controls the base slug that will display before each term | |
'with_front' => true // Don't display the category base before | |
) | |
) | |
); | |
register_taxonomy( | |
'job_locationa', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces). | |
'job', //post type name | |
array( | |
'hierarchical' => true, | |
'label' => 'Job Location', //Display name | |
'query_var' => true, | |
'show_admin_column' => true, | |
'rewrite' => array( | |
'slug' => 'Job-location', // This controls the base slug that will display before each term | |
'with_front' => true // Don't display the category base before | |
) | |
) | |
); | |
register_taxonomy( | |
'com-job', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces). | |
'com-media', //post type name | |
array( | |
'hierarchical' => true, | |
'label' => 'Job', //Display name | |
'query_var' => true, | |
'show_admin_column' => true, | |
'rewrite' => array( | |
'slug' => 'Job ', // This controls the base slug that will display before each term | |
'with_front' => true // Don't display the category base before | |
) | |
) | |
); | |
} | |
add_action( 'init', 'versiontwos_taxonomy'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment