我在这个网站和许多其他网站上找到了一些在线解决方案,但大多数问题都与主题用户有关,而不是与主题开发人员有关。我正在构建的主题有一个问题,它没有在任何类型的模板中设置特色图像/缩略图,这意味着页面、帖子等。。。我也不能删除我手动预设的!
我还注意到如果我点击Set Featured Image
在WordPress贴子页面之前before 它有足够的时间来加载它,就像一个显示媒体库和allows 我来选择/设置图像!下图为媒体库的低端图像:
我尝试的内容:
移除插件更改主题(这确实允许我设置图像)
if ( $post_type !== \'post\' ) {
register_post_type( $post_type,
array(
\'labels\' => array(
\'name\' => __( ucfirst( $post_type ) ),
\'singular_name\' => __( $post_type ),
),
\'supports\' => array( \'title\', \'thumbnail\', \'editor\', \'excerpt\', \'author\', \'comments\', \'revisions\', \'custom-fields\'),
\'show_ui\' => true,
\'show_in_menu\' => true,
\'show_in_nav_menus\' => true,
\'show_in_admin_bar\' => true,
\'taxonomies\' => array( \'category\' ),
\'public\' => true,
\'has_archive\' => true,
\'rewrite\' => array(
\'slug\' => strtolower( $post_type ),
),
)
);
控制台中的错误显示:load-scripts.php?c=1&load[]=utils,jquery-core,jquery-migrate,plupload,quicktags&ver=4.7.5:5 POST admin-ajax.php 403 (Forbidden)