WordPress:如何通过 sql 将所有帖子从体育类别转换为新闻类别 [英] WordPress: How can i convert all post from sport category to news category by sql
本文介绍了WordPress:如何通过 sql 将所有帖子从体育类别转换为新闻类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用SQL语句将体育类的所有帖子转换为新闻类,因为我有2000多个帖子
How can convert all posts that in category sport into news category by using SQL statement, Because i have more than 2000 posts
推荐答案
这应该可行*,
UPDATE wp_term_relationships SET term_taxonomy_id = '3' WHERE term_taxonomy_id = '1';
其中1
是新闻类别的id,3
是体育类别的id
Where 1
is the id of the News category and 3
is the id of the Sports category
*您应该在进行此更改之前备份您的表格,以防出现问题.
这篇关于WordPress:如何通过 sql 将所有帖子从体育类别转换为新闻类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文