我有以下自定义帖子类型:
<?php
function university_post_types() {
// Professor Post Type
register_post_type(\'professor\', array(
\'supports\' => array(\'title\', \'editor\', \'thumbnail\', \'excerpt\'),
\'public\' => true,
\'labels\' => array(
\'name\' => \'Professors\',
\'add_new_item\' => \'Add New Professor\',
\'edit_item\' => \'Edit Professor\',
\'all_items\' => \'All Professors\',
\'singular_name\' => \'Professor\'
),
\'menu_icon\' => \'dashicons-welcome-learn-more\'
));
}
add_action(\'init\', \'university_post_types\');
在我的
functions.php
文件我正在注册以下主题支持:
function university_features() {
add_theme_support(\'title-tag\');
add_theme_support(\'post-thumbnails\');
add_image_size(\'professorLandscape\', 400, 260, true);
add_image_size(\'professorPortrait\', 480, 650, true);
}
add_action(\'after_setup_theme\', \'university_features\');
我的问题是不,
featured-image
框显示在我的自定义帖子类型中。
有什么建议我做错了什么?
感谢您的回复!