WordPress 帖子缩略图(特色图像)元框未出现在自定义帖子中
我已使用以下代码启用了特色图像:
if(function_exists('add_theme_support')){
add_theme_support('post-thumbnails');
set_post_thumbnail_size(145, 9999999999999999999999999999999999999999999, false);
}
并且一切正常,只是我在自定义帖子编辑器中找不到特色图像元框。在“显示”菜单下,我只有列数和其他 2 个不相关的选项。我使用的是 WordPress 的最新版本(我想是 3.1?)。
你能帮助我吗?我已经尝试过在该网站和其他地方找到的所有内容。
提前致谢。
I've enabled featured images with the following code:
if(function_exists('add_theme_support')){
add_theme_support('post-thumbnails');
set_post_thumbnail_size(145, 9999999999999999999999999999999999999999999, false);
}
and everything works fine except that I can't find the featured image metabox in my custom post editor. Under the "show" menu I only have the number of column and other 2 unrelated options. I'm on the last version of wordpress (3.1, I think?).
Can you help me? I've already tried everything I found on this website and elsewhere.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正确的方法是将所有这些代码插入到functions.php中
(其中事件是我的自定义帖子的名称,您应该使用您的)
(缩略图可以解决问题,但如果您想成为能够在您的帖子中添加标题或对其进行编辑!)
最后一定要勾选名为“缩略图”的框 - 我想,我的安装是另一种语言 - 在屏幕选项下(屏幕选项是右上角的按钮, 谷歌搜索名字,如果你找不到它)。
The correct way to do this is inserting all this code in functions.php
(where events is the name of my custom post, you should use yours)
(thumbnail does the trick, but don't forget title and editor if you want to be able to have a title in your post or edit it!)
And last be sure to tick the box called 'thumbnail' - I suppose, my installation is in another language - under screen options (screen options is a button in the upper right corner, Google the name if you can't find it).