Created
February 14, 2012 22:16
-
-
Save moskowite/1830998 to your computer and use it in GitHub Desktop.
Crafters 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
| <?php | |
| add_action( 'init', 'register_cpt_crafter' ); | |
| function register_cpt_crafter() { | |
| $labels = array( | |
| 'name' => _x( 'Crafters', 'crafter' ), | |
| 'singular_name' => _x( 'Crafter', 'crafter' ), | |
| 'add_new' => _x( 'Add New', 'crafter' ), | |
| 'add_new_item' => _x( 'Add New Crafter', 'crafter' ), | |
| 'edit_item' => _x( 'Edit Crafter', 'crafter' ), | |
| 'new_item' => _x( 'New Crafter', 'crafter' ), | |
| 'view_item' => _x( 'View Crafter', 'crafter' ), | |
| 'search_items' => _x( 'Search Crafters', 'crafter' ), | |
| 'not_found' => _x( 'No makers found', 'crafter' ), | |
| 'not_found_in_trash' => _x( 'No makers found in Trash', 'crafter' ), | |
| 'parent_item_colon' => _x( 'Parent Crafter:', 'crafter' ), | |
| 'menu_name' => _x( 'Crafters', 'crafter' ), | |
| ); | |
| $args = array( | |
| 'labels' => $labels, | |
| 'hierarchical' => true, | |
| 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'post-formats' ), | |
| 'taxonomies' => array( 'category', 'post_tag', 'page-category', 'maker', 'maker-location' ), | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'show_in_menu' => true, | |
| 'show_in_nav_menus' => true, | |
| 'publicly_queryable' => true, | |
| 'exclude_from_search' => false, | |
| 'has_archive' => true, | |
| 'query_var' => true, | |
| 'can_export' => true, | |
| 'rewrite' => true, | |
| 'capability_type' => 'post' | |
| ); | |
| register_post_type( 'crafter', $args ); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is terrible