I'm trying to create a custom post type that is named 'Books'. I'm currently using this child theme and I'm kinda lost in adding the custom type. Below is what I putted in my functions.php. What's missing in my code and how am i able to make custom loop for my 'Books'
/* New Post-Type */
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'Books',
array(
'labels' => array(
'name' => __( 'Books' ),
'singular_name' => __( 'Book' ),
'add_new' => __( 'Add New Book' ),
'edit' => __( 'Edit' ),
'search_items' => __( 'Search Book' ),
'not_found' => __( 'No Books Found' ),
'parent' => __( 'All Books' ),
),
'public' => true,
'menu_position' => 5,
'has_archive' => true,
'rewrite' => array('slug' => 'books'),
'can_export' => true,
'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail' ),
'taxonomies' => array('post-tag', 'category', 'categories'),
)
);
}
Thanks!