Wordpress - 将特色图片添加到自定义帖子类型 [英] Wordpress - adding Featured image to custom Post Type
本文介绍了Wordpress - 将特色图片添加到自定义帖子类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将特色图片添加到我的主题,但不是为帖子或页面添加 - 我创建了一个名为属性"的自定义类型(用于房地产经纪人),那么我如何启用特色图片,因为它没有没有出现在屏幕选项中?
I'm trying to add a Featured Image to my theme but not for Posts or Pages - I've created a custom type called Properties (its for an estate agent), so how do I enable Featured Image, as it doesn't appear in the sceen options?
希望有人能帮忙,
$property = new Cuztom_Post_Type( 'Property', array(
'supports' => array('title', 'editor')
));
推荐答案
$property = new Cuztom_Post_Type( 'Property', array(
'supports' => array('title', 'editor', 'thumbnail')
));
我似乎已经解决了我自己的问题 - 见上文
I appear to have solved my own question - see above
这篇关于Wordpress - 将特色图片添加到自定义帖子类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文