Created
May 21, 2013 23:17
-
-
Save hlotvonen/5624056 to your computer and use it in GitHub Desktop.
Make a 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
// **************************************************** | |
// Make a custom post type | |
// **************************************************** | |
function projektiRegister() | |
{ | |
$labels = array( | |
'name' => _x('Lisää projekti', 'post type general name'), | |
'singular_name' => _x('Lisää projekti', 'post type singular name'), | |
'add_new' => _x('Lisää uusi projekti', 'portfolio item'), | |
'all_items' => __( 'Kaikki projektit' ), | |
'add_new_item' => __('Uusi projekti'), | |
'edit_item' => __('Muokkaa projekteja'), | |
'new_item' => __('Uusi projekti'), | |
'view_item' => __('Näytä projekti sivuilla'), | |
'search_items' => __('Etsi projekteista'), | |
'not_found' => __('Tyhjä'), | |
'not_found_in_trash' => __('Mitään ei löytynyt roskiksesta'), | |
'parent_item_colon' => '' | |
); | |
$args = array( | |
'labels' => $labels, | |
'public' => true, | |
'publicly_queryable' => true, | |
'show_ui' => true, | |
'query_var' => true, | |
'capability_type' => 'post', | |
'hierarchical' => false, | |
'menu_position' => null, | |
'supports' => array('title', 'editor', 'thumbnail'), | |
'show_in_nav_menus' => true, | |
); | |
register_post_type('projekti' , $args); | |
} | |
add_action('init', 'projektiRegister'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment