Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. <?php
  2. function amas_register() {
  3. $labels = array(
  4. 'name' => _x('AMAs', 'post type general name'),
  5. 'singular_name' => _x('AMAs', 'post type singular name'),
  6. 'add_new' => _x('Add AMA', 'AMAs'),
  7. 'add_new_item' => __('Add New AMA'),
  8. 'edit_item' => __('Edit AMA'),
  9. 'new_item' => __('New AMA'),
  10. 'view_item' => __('View AMA'),
  11. 'search_items' => __('Search AMA'),
  12. 'not_found' => __('Nothing found'),
  13. 'not_found_in_trash' => __('Nothing found in Trash'),
  14. 'parent_item_colon' => ''
  15. );
  16. $args = array(
  17. 'labels' => $labels,
  18. 'public' => true,
  19. 'publicly_queryable' => true,
  20. 'show_ui' => true,
  21. 'query_var' => true,
  22. 'rewrite' => array( 'slug' => 'amas', 'with_front' => false ),
  23. // 'rewrite' => true,
  24. 'capability_type' => 'post',
  25. 'hierarchical' => false,
  26. //'menu_icon' => '',
  27. 'menu_position' => 8,
  28. 'supports' => array('title','editor','thumbnail','custom-fields')
  29. );
  30. register_post_type( 'amas' , $args );
  31. flush_rewrite_rules();
  32. }
  33. add_action('init', 'amas_register');
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement