Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action('init', 'show_register');
- function show_register() {
- //arguments to create the post type.
- $args = array(
- 'label' => __('shows'),
- 'singular_label' => __('Show'),
- 'public' => true,
- 'show_ui' => true,
- 'capability_type' => 'post',
- 'hierarchical' => true,
- 'has_archive' => true,
- 'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),
- 'rewrite' => array('slug' => 'shows', 'with_front'
- => false), );
- //Register type and custom taxonomy for type.
- register_post_type( 'shows' , $args );
- register_taxonomy("Show-type", array("shows"),
- array("hierarchical" => true, "label" => "Show
- Types", "singular_label" => "Show Type", "rewrite"
- => true, "slug" => 'show-type'));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment