Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ---------------------------------------------------------------------------------
- * Register Post Type Called Books
- * So you can focusing your Book-related content to this Post Type
- *
- */
- add_action('init', 'book_post_type');
- function book_post_type(){
- $labels = array(
- 'name' => _x('Books', 'post type general name'),
- 'singular_name' => _x('Book', 'post type singular name'),
- 'add_new' => _x('Add New', 'book'),
- 'add_new_item' => __('Add New Book'),
- 'edit_item' => __('Edit Book'),
- 'new_item' => __('New Book'),
- 'view_item' => __('View Book'),
- 'search_items' => __('Search Books'),
- 'not_found' => __('No books found'),
- 'not_found_in_trash' => __('No books found in Trash'),
- 'parent_item_colon' => '',
- 'menu_name' => 'Books'
- );
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'query_var' => true,
- 'rewrite' => true,
- 'capability_type' => 'post',
- 'has_archive' => true,
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array('title','editor','author','thumbnail','excerpt','comments')
- );
- register_post_type('book',$args);
- }
Add Comment
Please, Sign In to add comment