Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Portfolio Custom Post Type
- $labels = array(
- 'name' => _x('Portfolio', 'post type general name', 'site5framework'),
- 'singular_name' => _x('Portfolio', 'post type singular name', 'site5framework'),
- 'add_new' => _x('Add New', 'work', 'site5framework'),
- 'add_new_item' => __('Add New Portfolio', 'site5framework'),
- 'edit_item' => __('Edit Portfolio', 'site5framework'),
- 'new_item' => __('New Portfolio', 'site5framework'),
- 'view_item' => __('View Portfolio', 'site5framework'),
- 'search_items' => __('Search Portfolio', 'site5framework'),
- 'not_found' => __('No work found', 'site5framework'),
- 'not_found_in_trash' => __('No portfolio entry found in Trash', 'site5framework'),
- 'parent_item_colon' => ''
- );
- register_post_type('portfolio', array(
- 'labels' => $labels,
- 'singular_label' => __('portfolio'),
- 'public' => true,
- 'show_ui' => true, // UI in admin panel
- '_builtin' => false, // It's a custom post type, not built in!
- '_edit_link' => 'post.php?post=%d',
- 'capability_type' => 'post',
- 'hierarchical' => false,
- 'rewrite' => array("slug" => "portfolio"), // Permalinks format
- 'supports' => array('title','editor','thumbnail')
- ));
- register_taxonomy("portfoliocat", array("portfolio"), array("hierarchical" => true, "label" => "Portfolio Category", "singular_label" => "Portfolio Category", "rewrite" => true));
Advertisement
Add Comment
Please, Sign In to add comment