好的,
所以这是一个奇怪的issue...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')
)
);
}
有人知道代码有什么问题,或者知道为什么这段代码会干扰正常的缩略图生成?
谢谢,
乔希
https://wordpress.stackexchange.com/questions/90608
复制相似问题