1. // CUSTOM POST TYPE - change every instance of roste to the id of the post type and change Members to the name that will be displayed in the admin
  2. function my_post_type_roster() {
  3. register_post_type( 'roster',
  4. array(
  5. 'label' => __('Members'),
  6. 'singular_label' => __('Member Item', 'theme1404'),
  7. '_builtin' => false,
  8. 'public' => true,
  9. 'show_ui' => true,
  10. 'show_in_nav_menus' => true,
  11. 'hierarchical' => true,
  12. 'custom-fields' => true,
  13. 'capability_type' => 'post',
  14. 'menu_icon' => get_template_directory_uri() . '/images/members-icon.png',
  15. 'rewrite' => array(
  16. 'slug' => 'members',
  17. 'with_front' => FALSE,
  18. ),
  19. 'supports' => array(
  20. 'title',
  21. 'editor',
  22. 'thumbnail',
  23. 'excerpt',
  24. 'custom-fields',
  25. 'comments')
  26. )
  27. );
  28. register_taxonomy('roster', array('hierarchical' => false, 'label' => 'roster Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
  29. }
  30.  
  31. add_action('init', 'my_post_type_roster');