Custom Fields in Custom Post Type
-
I am developing a comics website for which I require a custom post type which I created using below function in functions.php. Now I am looking for few custom fields to upload multiple images as snapshots of comics. Could someone please help me?
function my_post_comics() { $labels = array( 'name' => _x( 'Comics', 'post type general name' ), 'singular_name' => _x( 'Comic', 'post type singular name' ), 'add_new' => _x( 'Add New', 'comic' ), 'add_new_item' => __( 'Add New Comic' ), 'edit_item' => __( 'Edit Comic' ), 'new_item' => __( 'New Comic' ), 'all_items' => __( 'All Comics' ), 'view_item' => __( 'View Comic' ), 'search_items' => __( 'Search Comics' ), 'not_found' => __( 'No comics found' ), 'not_found_in_trash' => __( 'No comics found in the Trash' ), 'parent_item_colon' => '', 'menu_name' => 'Comics' ); $args = array( 'labels' => $labels, 'description' => 'Holds comics and comic specific data', 'public' => true, 'menu_position' => 5, 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ), 'has_archive' => true, 'rewrite' => array("slug" => "comics"), 'capability_type' => 'post' ); register_post_type( 'comic', $args ); } add_action( 'init', 'my_post_comics' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom Fields in Custom Post Type’ is closed to new replies.