为什么自定义帖子类型中没有显示特色图片选项?

时间:2017-02-08 作者:Shahbaz Amin

我已经创建了一个名为images的自定义帖子类型,但它没有在我的wp管理员中显示特色图片选项。我在函数中注册了自定义帖子类型。php组件

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\' );

1 个回复
SO网友:Alok Shrestha

可能是add\\u theme\\u支持(“post缩略图”);主题的“after\\u setup\\u theme”动作挂钩函数中不包含。

相关推荐