Created
March 9, 2017 16:44
-
-
Save munts/72abbba2374d69044b8161aff1d16d61 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
//Creating Custom Post types for work | |
function setup_work_cpt(){ | |
$labels = array( | |
'name' => _x('work', 'post type general name'), | |
'singular_name' => _x('work', 'post type singular name'), | |
'add_new' => _x('Add New', 'work'), | |
'add_new_item' => __('Add New work'), | |
'edit_item' => __('Edit work'), | |
'new_item' => __('New work'), | |
'all_items' => __('All work'), | |
'view_item' => __('View work'), | |
'search_items' => __('Search work'), | |
'not_found' => __('No work Found'), | |
'not_found_in_trash' => __('No work found in the trash'), | |
'parent_item_colon' => '', | |
'menu_name' => 'work' | |
); | |
$args = array( | |
'labels' => $labels, | |
'description' => 'The BMD work types', | |
'rewrite' => array('slug' => 'work'), | |
'public' => true, | |
'menu_position' => 5, | |
'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'comments', 'custom-fields', 'page-attributes'), | |
'has_archive' => true, | |
'taxonomies' => array(''), | |
'menu_icon' => 'dashicons-welcome-write-blog', | |
); | |
register_post_type('work', $args); | |
} | |
add_action('init', 'setup_work_cpt'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment