タイトルで言い切ってるシリーズ
カテゴリ ID 4 に属する投稿を、カスタム投稿タイプ photo に
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
— カテゴリー 4 の投稿を、カスタム投稿タイプ photo に | |
update wp_posts | |
set post_type = 'photo' | |
where post_type = 'post' | |
and exists | |
(select object_id | |
from wp_term_taxonomy as t | |
inner join wp_relationships as r on t.term_taxonomy_id = r.term_taxonomy_id | |
where t.term_id = 4 | |
and r.object_id = wp_posts.ID); |
コメントを残す