Skip to content

Instantly share code, notes, and snippets.

@anunay
Created February 26, 2014 06:23
Show Gist options
  • Save anunay/9224543 to your computer and use it in GitHub Desktop.
Save anunay/9224543 to your computer and use it in GitHub Desktop.
cpt slider
<?php
add_action('init', 'cptui_register_my_cpt_slider');
function cptui_register_my_cpt_slider() {
register_post_type('slider', array(
'label' => 'Slider',
'description' => 'Home Page Slider',
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'post',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'slider', 'with_front' => 1),
'query_var' => true,
'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail'),
'labels' => array (
'name' => 'Slider',
'singular_name' => 'Slider',
'menu_name' => 'Slider',
'add_new' => 'Add Slider',
'add_new_item' => 'Add New Slider',
'edit' => 'Edit',
'edit_item' => 'Edit Slider',
'new_item' => 'New Slider',
'view' => 'View Slider',
'view_item' => 'View Slider',
'search_items' => 'Search Slider',
'not_found' => 'No Slider Found',
'not_found_in_trash' => 'No Slider Found in Trash',
'parent' => 'Parent Slider',
)
) ); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment