Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // registration code for players post type
- function register_players_posttype() {
- $labels = array(
- 'name' => _x( 'players', 'post type general name' ),
- 'singular_name' => _x( 'player', 'post type singular name' ),
- 'add_new' => _x( 'Add New', 'player'),
- 'add_new_item' => __( 'Add New player '),
- 'edit_item' => __( 'Edit player '),
- 'new_item' => __( 'New player '),
- 'view_item' => __( 'View player '),
- 'search_items' => __( 'Search players '),
- 'not_found' => __( 'No player found' ),
- 'not_found_in_trash'=> __( 'No players found in Trash' ),
- 'parent_item_colon' => ''
- );
- $supports = array('title','editor','author','thumbnail','excerpt','custom-fields','comments','revisions','title','editor','author','thumbnail','excerpt','custom-fields','comments','revisions','title','editor','author','thumbnail','excerpt','custom-fields','comments','post-formats','page-attributes');
- $post_type_args = array(
- 'labels' => $labels,
- 'singular_label' => __('player'),
- 'public' => true,
- 'show_ui' => true,
- 'publicly_queryable'=> true,
- 'query_var' => true,
- 'capability_type' => 'post',
- 'has_archive' => true,
- 'hierarchical' => true,
- 'rewrite' => array('slug' => 'players'),
- 'supports' => $supports,
- 'menu_position' => 5,
- 'menu_icon' => ''
- );
- register_post_type('players',$post_type_args);
- }
- add_action('init', 'register_players_posttype');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement