备份数据库,将此代码添加到函数中。主题中的php文件:
$all_posts = get_posts(array(
\'numberposts\' => -1,
\'post_type\' => \'post\',
));
foreach($all_posts as $p)
set_post_format($p->ID, \'standard\');
刷新删除代码或使用SQL命令:
UPDATE `term_relationships`
SET term_taxonomy_id = \'standard_post_format_id\'
WHERE term_taxonomy_id = \'gallery_post_format_id\'
更改
standard_post_format_id
和
gallery_post_format_id
ID与term\\u taxonomy/terms表中的post格式名称匹配