Advertisement
pixelkicks

CPT for Events from functions.php

Aug 30th, 2013
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. add_action('init', 'cptui_register_my_cpt');
  2. function cptui_register_my_cpt() {
  3. register_post_type('events', array(
  4. 'label' => "__('Events')",
  5. 'description' => '',
  6. 'public' => 'false',
  7. 'show_ui' => 'true',
  8. 'show_in_menu' => 'true',
  9. 'capability_type' => 'post',
  10. 'hierarchical' => 'false',
  11. 'rewrite' => array('slug' => 'events', 'with_front' => '1'),
  12. 'query_var' => 'true',
  13. 'exclude_from_search' => 'false',
  14. 'menu_position' => '5',
  15. 'menu_icon' => '/wp-content/themes/ausnexus/images/icons/wp_events.png',
  16. 'supports' => array('title','editor','revisions','thumbnail','post-formats'),
  17. 'labels' => array (
  18. 'name' => 'Events',
  19. 'singular_name' => 'Events',
  20. 'menu_name' => 'Events',
  21. 'add_new' => 'Add Event',
  22. 'add_new_item' => 'Add New Event',
  23. 'edit' => 'Edit',
  24. 'edit_item' => 'Edit Events',
  25. 'new_item' => 'New Events',
  26. 'view' => 'View Events',
  27. 'view_item' => 'View Events',
  28. 'search_items' => 'Search Events',
  29. 'not_found' => 'No Events Found',
  30. 'not_found_in_trash' => 'No Events Found in Trash',
  31. 'parent' => 'Parent Events',
  32. )
  33. ) ); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement