Skip to content

Instantly share code, notes, and snippets.

@moskowite
Created September 5, 2012 23:55
Show Gist options
  • Save moskowite/3648078 to your computer and use it in GitHub Desktop.
Save moskowite/3648078 to your computer and use it in GitHub Desktop.
slideshow cpt
add_action( 'init', 'make_slideshow_cpt' );
function make_slideshow_cpt() {
$labels = array(
'name' => _x( 'Slideshows', 'slideshow' ),
'singular_name' => _x( 'Slideshow', 'slideshow' ),
'add_new' => _x( 'Add New', 'slideshow' ),
'add_new_item' => _x( 'Add New Slideshow', 'slideshow' ),
'edit_item' => _x( 'Edit Slideshow', 'slideshow' ),
'new_item' => _x( 'New Slideshow', 'slideshow' ),
'view_item' => _x( 'View Slideshow', 'slideshow' ),
'search_items' => _x( 'Search Slideshows', 'slideshow' ),
'not_found' => _x( 'No slides found', 'slideshow' ),
'not_found_in_trash' => _x( 'No Slideshows found in Trash', 'slideshow' ),
'parent_item_colon' => _x( 'Parent Slideshow:', 'slideshow' ),
'menu_name' => _x( 'Slideshows', 'slideshow' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'description' => 'Contains slideshows for use in the makeblog',
'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
'taxonomies' => array( 'category', 'post_tag' ),
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_position' => 5,
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => true,
'has_archive' => true,
'query_var' => true,
'can_export' => true,
'rewrite' => true,
'capability_type' => 'post'
);
register_post_type( 'slideshow', $args );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment