Friday, November 21, 2008

WordPress bulk modify post catgories - Part IV

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by Jim on Oct 21, 2007 90 views

Lets see what posts have multiple categories

SELECT post_id, count( * )
FROM wp_3_post2cat
GROUP BY post_id
HAVING count( post_id ) >1
LIMIT 0 , 30

This gives us the following results -

post_id  count( * ) 
17 2
21 2
29 8
572 2
613 2
630 2

I went in and fixed each of these posts to remove them from uncategorized. This tells me that no posts have uncategorized and another category, so I don’t have to worry about moving to a new category and creating a duplicate record in the wp_3_post2cat table. 29 is one that I did, to make sure my query worked properly, in case you notice how out of whack it looks compared to the others.

Filed Under: technology

StumbleUpon Digg del.icio.us Technorati Reddit RSS Feed

Add A Comment

You must be logged in to post a comment.