Created
November 24, 2011 19:36
-
-
Save chriscoyier/1392104 to your computer and use it in GitHub Desktop.
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', 'create_post_type' ); | |
function create_post_type() { | |
register_post_type( 'screenshot', | |
array( | |
'labels' => array( | |
'name' => __( 'Screenshots' ), | |
'singular_name' => __( 'Screenshot' ), | |
'add_new' => __( 'Add Screenshot' ), | |
'add_new_item' => __( 'Add New Screenshot' ), | |
'edit_item' => __( 'Edit Screenshot' ), | |
), | |
'public' => true, | |
'has_archive' => true, | |
'rewrite' => array('slug' => 'gallery'), | |
'supports' => array('title', 'editor', 'custom-fields', 'comments'), | |
'taxonomies' => array('post_tag', 'category') | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment