Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CUSTOM POST TYPE - change every instance of roste to the id of the post type and change Members to the name that will be displayed in the admin
- function my_post_type_roster() {
- register_post_type( 'roster',
- array(
- 'label' => __('Members'),
- 'singular_label' => __('Member Item', 'theme1404'),
- '_builtin' => false,
- 'public' => true,
- 'show_ui' => true,
- 'show_in_nav_menus' => true,
- 'hierarchical' => true,
- 'custom-fields' => true,
- 'capability_type' => 'post',
- 'menu_icon' => get_template_directory_uri() . '/images/members-icon.png',
- 'rewrite' => array(
- 'slug' => 'members',
- 'with_front' => FALSE,
- ),
- 'supports' => array(
- 'title',
- 'editor',
- 'thumbnail',
- 'excerpt',
- 'custom-fields',
- 'comments')
- )
- );
- register_taxonomy('roster', array('hierarchical' => false, 'label' => 'roster Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
- }
- add_action('init', 'my_post_type_roster');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement