Last active
July 4, 2017 17:46
-
-
Save claudioweb/2cafcbb1db448c725e36df5248a5101d to your computer and use it in GitHub Desktop.
Taxonomy exemplo para modelos
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 | |
function modelos() { | |
$labels = array( | |
'name' => 'Modelos', | |
'singular_name' => 'Modelo' | |
); | |
$args = array( | |
'hierarchical' => true, | |
'labels' => $labels, | |
'show_ui' => true, | |
'show_admin_column' => true, | |
'update_count_callback' => '_update_post_term_count', | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'modelos' ), | |
'exclude_from_search' => false, | |
'publicly_queryable' => true, | |
'public' => true, | |
); | |
register_taxonomy( 'modelos', 'produtos', $args ); | |
} | |
add_action( 'init', 'modelos' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment