Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress主题没有';t在自定义帖子类型中显示设置特色图片按钮_Wordpress_Wordpress Theming_Custom Post Type - Fatal编程技术网

Wordpress主题没有';t在自定义帖子类型中显示设置特色图片按钮

Wordpress主题没有';t在自定义帖子类型中显示设置特色图片按钮,wordpress,wordpress-theming,custom-post-type,Wordpress,Wordpress Theming,Custom Post Type,我正在使用,我注意到在我创建的自定义帖子类型中缺少了向帖子添加图像的按钮 在functions.php中激活了对缩略图的支持: add_theme_support('post-thumbnails'); 我尝试添加自定义帖子类型的数组: add_theme_support('post-thumbnails', array('post', 'page', 'article', 'cpt1', 'cpt2', 'cpt3')); 但这并没有改变任何事情 当我注册自定义帖子类型时,支持缩略图:

我正在使用,我注意到在我创建的自定义帖子类型中缺少了向帖子添加图像的按钮

functions.php
中激活了对缩略图的支持:

add_theme_support('post-thumbnails');
我尝试添加自定义帖子类型的数组:

add_theme_support('post-thumbnails', array('post', 'page', 'article', 'cpt1', 'cpt2', 'cpt3'));
但这并没有改变任何事情

当我注册自定义帖子类型时,支持缩略图:

    'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes' ),
哪里有问题?

移动这条线

add_theme_support('post-thumbnails');
functions.php
文件的底部,实际上解决了这个问题


我不确定这是否真的是一个解决方案。把它放在底部有意义吗?是否有一些参数要传递给此函数或其他函数以更改执行顺序?

您是否检查了屏幕选项中是否未隐藏特征图像的框?