Advertisement
Guest User

Untitled

a guest
Sep 15th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. // Custom Post types for testimonial
  2. add_action( 'init', '_init_blm_testimonials' );
  3. function _init_blm_testimonials() {
  4. register_post_type( 'testimonial',
  5. array(
  6. 'labels' => array(
  7. 'name' => __( 'Testimonials' ),
  8. 'singular_name' => __( 'Testimonial' ),
  9. 'add_new' => __( 'Add New' ),
  10. 'add_new_item' => __( 'Add Testimonial' ),
  11. 'edit' => __( 'Edit' ),
  12. 'edit_item' => __( 'Edit Testimonial' ),
  13. 'new_item' => __( 'New Testimonial' ),
  14. 'view' => __( 'View Testimonial' ),
  15. 'view_item' => __( 'View Testimonial' ),
  16. 'search_items' => __( 'Search Testimonials' ),
  17. 'not_found' => __( 'No Testimonials found' ),
  18. 'not_found_in_trash' => __( 'No Testimonials found in Trash' ),
  19. ),
  20. 'public' => true,
  21. 'show_in_nav_menus' => false,
  22. 'show_ui' => true,
  23. 'publicly_queryable' => true,
  24. 'exclude_from_search' => false,
  25. 'hierarchical' => false,
  26. 'menu_position' => 20,
  27. 'capability_type' => 'post',
  28. 'menu_icon' => get_stylesheet_directory_uri() . '/images/testimonial_menu.png',
  29. 'query_var' => true,
  30. 'rewrite' => array( 'slug' => 'testimonials', 'with_front' => true ),
  31. 'has_archive' => true,
  32. 'supports' => array('title', 'editor'),
  33. )
  34. );
  35. register_taxonomy(
  36. 'genre',
  37. array( 'testimonial' ),
  38. array(
  39. 'public' => true,
  40. 'show_in_nav_menus' => true,
  41. 'show_ui' => true,
  42. 'publicly_queryable' => true,
  43. 'exclude_from_search' => false,
  44. 'rewrite' => array( 'slug' => 'genre' ),
  45. 'hierarchical' => false,
  46. 'query_var' => true,
  47. 'labels' => array(
  48. 'name' => _x( 'Genres', 'taxonomy general name' ),
  49. 'singular_name' => _x( 'Genre', 'taxonomy singular name' ),
  50. 'search_items' => __( 'Search Genres' ),
  51. 'all_items' => __( 'All Genres' ),
  52. 'parent_item' => __( 'Parent Genre' ),
  53. 'parent_item_colon' => __( 'Parent Genre:' ),
  54. 'edit_item' => __( 'Edit Genre' ),
  55. 'update_item' => __( 'Update Genre' ),
  56. 'add_new_item' => __( 'Add New Genre' ),
  57. 'new_item_name' => __( 'New Genre Name' ),
  58. ),
  59. )
  60. );
  61. // set taxonomy registration
  62. register_taxonomy_for_object_type('testimonial', 'genre');
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement