wordpress批量删除分类或者标签的所有文章

4 3月

wordpress批量删除分类或者标签的所有文章

delete
from
wp_posts 
using 
wp_posts,
wp_term_relationships,
wp_term_taxonomy 
where 
wp_posts.id=wp_term_relationships.object_id 
and 
wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id 
and 
wp_term_relationships.term_taxonomy_id = 12333
term_taxonomy_id 是分类ID,在url里可以看到

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注