Created
November 14, 2012 00:30
-
-
Save verteb/4069377 to your computer and use it in GitHub Desktop.
Wordpress : Custom post type
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
| //Realisations | |
| $labels = array( | |
| 'name' => __('Realisations', 'realisations'), | |
| 'singular_name' => __('Realisation', 'realisations'), | |
| 'add_new' => __('Ajouter', 'realisations'), | |
| 'add_new_item' => __('Ajouter Realisation', 'realisations'), | |
| 'edit_item' => __('Modifier Realisation', 'realisations'), | |
| 'new_item' => __('Realisation Realisation', 'realisations'), | |
| 'view_item' => __('Voir Realisation', 'realisations'), | |
| 'search_items' => __('Rechercher Realisation', 'realisations'), | |
| 'not_found' => __('Aucune Realisation trouvé', 'realisations'), | |
| 'not_found_in_trash' => __('Aucune Realisation trouvé dans la corbeille','realisations') | |
| ); | |
| $args = array( | |
| 'label' => __('Realisations', 'realisations'), | |
| 'labels' => $labels, | |
| 'public' => true, | |
| 'capability_type' => 'page', | |
| 'menu_position' => 20, | |
| 'hierarchical' => true, | |
| 'show_in_nav_menus' => true, | |
| 'supports' => array( 'title', 'page-attributes') | |
| ); | |
| register_post_type( 'realisations', $args ); | |
| register_taxonomy( 'realisation-cat', 'realisations', array( 'hierarchical' => true, 'label' => 'Type de réalisation', 'query_var' => true, 'rewrite' => true ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment