Created
February 13, 2014 13:22
-
-
Save natejones/8974939 to your computer and use it in GitHub Desktop.
WordPress Custom Post Type
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
//*********************** | |
// | |
// CREATE CUSTOM POST TYPES | |
// | |
//*********************** | |
/* Custom Post Types */ | |
/* Bio */ | |
add_action('init', 'bio_register'); | |
function bio_register() { | |
$labels = array( | |
'name' => _x('Bio', 'post type general name'), | |
'singular_name' => _x('Bio', 'post type singular name'), | |
'add_new' => _x('Add New', 'Bio'), | |
'add_new_item' => __('Add New'), | |
'edit_item' => __('Edit Bio'), | |
'new_item' => __('New'), | |
'view_item' => __('View Bio'), | |
'search_items' => __('Search Bio'), | |
'not_found' => __('Nothing found'), | |
'not_found_in_trash' => __('Nothing found in Trash'), | |
'parent_item_colon' => '' | |
); | |
$args = array( | |
'labels' => $labels, | |
'public' => true, | |
'publicly_queryable' => true, | |
'show_ui' => true, | |
'query_var' => true, | |
//'menu_icon' => get_stylesheet_directory_uri() . '/images/today.png', | |
'rewrite' => true, | |
'capability_type' => 'post', | |
'hierarchical' => false, | |
'menu_position' => null, | |
'supports' => array('editor','thumbnail'), | |
'taxonomies' => array('category') | |
); | |
register_post_type( 'bio' , $args ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment