Created
September 5, 2012 23:55
-
-
Save moskowite/3648078 to your computer and use it in GitHub Desktop.
slideshow cpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'make_slideshow_cpt' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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