Guest User

Untitled

a guest
May 10th, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. add_action('init', 'show_register');
  4.  
  5. function show_register() {
  6.  
  7.  
  8. //arguments to create the post type.
  9.  
  10. $args = array(
  11.  
  12. 'label' => __('shows'),
  13. 'singular_label' => __('Show'),
  14. 'public' => true,
  15. 'show_ui' => true,
  16. 'capability_type' => 'post',
  17. 'hierarchical' => true,
  18. 'has_archive' => true,
  19. 'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),
  20. 'rewrite' => array('slug' => 'shows', 'with_front'
  21. => false), );
  22. //Register type and custom taxonomy for type.
  23. register_post_type( 'shows' , $args );
  24.  
  25. register_taxonomy("Show-type", array("shows"),
  26. array("hierarchical" => true, "label" => "Show
  27. Types", "singular_label" => "Show Type", "rewrite"
  28. => true, "slug" => 'show-type'));
  29.  
  30.  
  31.  
  32. }
  33.  
  34.  
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment