SHOW:
|
|
- or go back to the newest paste.
1 | /* Register Custom Post Types********************************************/ | |
2 | ||
3 | add_action( 'init', 'create_post_type' ); | |
4 | function create_post_type() { | |
5 | register_post_type( 'testimonial', | |
6 | array( | |
7 | 'labels' => array( | |
8 | 'name' => __( 'Testimonial' ), | |
9 | 'singular_name' => __( 'Testimonial' ), | |
10 | 'add_new' => __( 'Add New' ), | |
11 | 'add_new_item' => __( 'Add New Testimonial' ), | |
12 | 'edit_item' => __( 'Edit Testimonial' ), | |
13 | 'new_item' => __( 'New Testimonial' ), | |
14 | 'view_item' => __( 'View Testimonial' ), | |
15 | 'not_found' => __( 'Sorry, we couldn\'t find the Testimonial you are looking for.' ) | |
16 | ), | |
17 | 'public' => true, | |
18 | 'publicly_queryable' => false, | |
19 | 'exclude_from_search' => true, | |
20 | 'menu_position' => 14, | |
21 | 'has_archive' => false, | |
22 | 'hierarchical' => false, | |
23 | 'capability_type' => 'page', | |
24 | 'rewrite' => array( 'slug' => 'testimonial' ), | |
25 | 'supports' => array( 'title', 'editor', 'custom-fields' ) | |
26 | ) | |
27 | ); | |
28 | } |