好啊
所以这是一个奇怪的问题。。。WordPress不生成缩略图,我设置了图像大小和所有内容。。。我很确定这与我的自定义帖子类型代码有关(见下文),因为当我删除它时,缩略图会正确生成。
// Tells WP to add a slides and marquee sections
add_action( \'init\', \'create_my_post_types\' );
// WP slides section attributes
function create_my_post_types() {
// Add Slide Section
register_post_type( \'slides\',
array(
\'exclude_from_search\' => true,
\'labels\' => array(
\'name\' => __( \'Slides\' ),
\'singular_name\' => __( \'Slides\' ),
\'search_items\' => __(\'Search Slides\'),
),
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'menu_position\' => 5,
\'supports\' => array(\'title\',\'editor\',\'thumbnail\')
)
);
// Add Marquee Section
register_post_type( \'marquee\',
array(
\'exclude_from_search\' => true,
\'labels\' => array(
\'name\' => __( \'Marquee\' ),
\'singular_name\' => __( \'Marquee\' ),
\'search_items\' => __(\'Search Marquee\'),
),
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'menu_position\' => 6,
\'supports\' => array(\'title\',\'editor\')
)
);
}
有人知道代码有什么问题,或者知道为什么这段代码会干扰正常的缩略图生成吗?
谢谢,乔希