0

I have created a custom post type named as images but it isn't showing option of featured image in my wp-admin. I registered my custom post type in functions.php as

function my_custom_post_Images(){   
$labels2 = array(
'name'               => _x( 'Images', 'post type general name' ),
'singular_name'      => _x( 'Image', 'post type singular name' ),
'add_new'            => _x( 'Add New', 'Image' ),
'add_new_item'       => __( 'Add New Image' ),
'edit_item'          => __( 'Edit Image' ),
'new_item'           => __( 'New Image' ),
'all_items'          => __( 'All Images' ),
'view_item'          => __( 'View Image' ),
'search_items'       => __( 'Search Images' ),
'not_found'          => __( 'No Images found' ),
'not_found_in_trash' => __( 'No Images found in the Trash' ),
'parent_item_colon'  => '',
'menu_name'          => 'Post Images');


 $args2 = array(
'labels'        => $labels2,
'description'   => 'Displays Images',
'public'        => true,
'menu_position' => 3,
'supports'      => array('title','editor','thumbnail'),
'has_archive'   => true, );

    register_post_type( 'Images', $args2 );
      }
    add_action( 'init', 'my_custom_post_Images' );
0

May be add_theme_support( 'post-thumbnails' ); is not included in your theme's 'after_setup_theme' action hook function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.