Created
September 27, 2012 17:26
-
-
Save zapatoche/3795264 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // custom post type | |
| add_action('init', 'portfolio_register'); | |
| function portfolio_register() { | |
| $labels = array( | |
| 'name' => __('My Portfolio', 'post type general name'), | |
| 'singular_name' => __('Portfolio Item', 'post type singular name'), | |
| 'add_new' => __('Add New', 'portfolio item'), | |
| 'add_new_item' => __('Add New Portfolio Item'), | |
| 'edit_item' => __('Edit Portfolio Item'), | |
| 'new_item' => __('New Portfolio Item'), | |
| 'view_item' => __('View Portfolio Item'), | |
| 'search_items' => __('Search Portfolio'), | |
| '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() . '/article16.png', | |
| 'rewrite' => true, | |
| 'capability_type' => 'post', | |
| 'hierarchical' => false, | |
| 'menu_position' => null, | |
| 'supports' => array('title', 'editor', 'thumbnail') | |
| ); | |
| register_post_type( 'portfolio' , $args ); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kkk