evolved_create_post_types

The Evolved evolved create post types function.

Description

evolved_create_post_types(); 

Usage

  1. if ( !function_exists( 'evolved_create_post_types' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = evolved_create_post_types(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function evolved_create_post_types() {  
  2. // Game reviews 
  3. register_post_type( 'evolved_game_reviews',  
  4. array(  
  5. 'labels' => array(  
  6. 'name' => __( 'Game Reviews', 'evolved' ),  
  7. 'singular_name' => __( 'Game Review', 'evolved' ),  
  8. 'add_new' => __('Add new review', 'evolved'),  
  9. 'edit_item' => __('Edit review', 'evolved'),  
  10. 'new_item' => __('New review', 'evolved'),  
  11. 'view_item' => __('View review', 'evolved'),  
  12. 'search_items' => __('Search reviews', 'evolved'),  
  13. 'not_found' => __('No reviews found', 'evolved'),  
  14. 'not_found_in_trash' => __('No reviews found in Trash', 'evolved')  
  15. ),  
  16. 'public' => true,  
  17. 'publicly_queryable' => true,  
  18. 'show_ui' => true,  
  19. 'show_in_nav_menus' => false,  
  20. 'exclude_from_search' => false,  
  21. 'hierarchical' => false,  
  22. 'menu_position' => 22,  
  23. 'has_archive' => true,  
  24. 'rewrite' => array('slug' => 'game-review'),  
  25. 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'comments', 'revisions'),  
  26. 'taxonomies' => array('post_tag')  
  27. )  
  28. ); 
  29. // Video 
  30. register_post_type( 'evolved_video',  
  31. array( 
  32. 'labels' => array( 
  33. 'name' => __( 'Videos', 'evolved' ),  
  34. 'singular_name' => __( 'Video', 'evolved' ),  
  35. 'add_new' => __( 'Add New', 'evolved' ),  
  36. 'add_new_item' => __( 'Add New Video', 'evolved' ),  
  37. 'edit' => __( 'Edit', 'evolved' ),  
  38. 'edit_item' => __( 'Edit Video', 'evolved' ),  
  39. 'new_item' => __( 'New Video', 'evolved' ),  
  40. 'view' => __( 'View Video', 'evolved' ),  
  41. 'view_item' => __( 'View Video', 'evolved' ),  
  42. 'search_items' => __( 'Search Videos', 'evolved' ),  
  43. 'not_found' => __( 'No videos found', 'evolved' ),  
  44. 'not_found_in_trash' => __( 'No videos found in Trash', 'evolved' ),  
  45. 'parent' => __( 'Parent Video', 'evolved' ),  
  46. ),  
  47. 'public' => true,  
  48. 'publicly_queryable' => true,  
  49. 'show_in_nav_menus' => false,  
  50. 'show_ui' => true,  
  51. 'exclude_from_search' => false,  
  52. 'hierarchical' => false,  
  53. 'menu_position' => 22,  
  54. 'has_archive' => true,  
  55. 'rewrite' => array('slug' => 'video'),  
  56. 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'),  
  57. 'taxonomies' => array('post_tag')  
  58. )  
  59. );  
  60. flush_rewrite_rules(); 
  61. }