Guest User

Untitled

a guest
Oct 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function create_my_post_types() {
  2. register_post_type(
  3. 'topics',
  4. array(
  5. 'label' => 'Topics',
  6. 'description' => '',
  7. 'public' => true,
  8. 'menu_icon' => get_bloginfo('template_directory') . '/images/help-icon.png',
  9. 'menu_order' => true,
  10. 'show_ui' => true,
  11. 'show_in_menu' => true,
  12. 'capability_type' => 'page',
  13. 'hierarchical' => true,
  14. 'has_archive' => true,
  15. 'rewrite' => array('slug' => ''),
  16. 'query_var' => true,
  17. 'supports' => array('title','editor','custom-fields','thumbnail','page-attributes',),
  18.  
  19. 'labels' => array (
  20. 'name' => 'Topics',
  21. 'singular_name' => 'Topic',
  22. 'menu_name' => 'Topics',
  23. 'add_new' => 'Add topic',
  24. 'add_new_item' => 'Add new topic',
  25. 'edit' => 'Edit',
  26. 'edit_item' => 'Edit topic',
  27. 'new_item' => 'New topic',
  28. 'view' => 'View topic',
  29. 'view_item' => 'View topic',
  30. 'search_items' => 'Search topics',
  31. 'not_found' => 'No topics Found',
  32. 'not_found_in_trash' => 'No topics Found in Trash',
  33. 'parent' => 'Parent topic',
  34. ),) );
  35. }
Add Comment
Please, Sign In to add comment