[SOLUTION] Migrating categories using MySQL
I've just bought a license of this very interesting theme, after having tried another one from another company, that disappointed me for the very poor development and support (at least they refunded me).
Hoping to not get disappointed also with this one, I'm trying to give my 2 cents to this forum support, with a solution I've found looking to similar issue's posts I've found here.
My problem is that, after having created all the categories with the other theme, I didn't want to create them again, one by one, with this new theme that uses custom taxonomies (great idea btw!).
So, I've wrote an SQL statement that solved the problem in a second.
This requires access to MySQL: something easily solved installing the plugin
wp-myphpadmin.
The categories I wanted to migrate are all but a few ones (the ones with and ID <=3 must be kept as standard categories).
Therefore, my statement will filter all terms in taxonomies that have ID > 3, are a "category" type and will update them ad "ad_cat":
Code:
UPDATE wp_term_taxonomy SET taxonomy='ad_cat' WHERE term_id>3 AND taxonomy='category'
That's all.
Of course, if you want to exclude more categories, you can add them in the WHERE statement (you can find their ID browsing the "terms" table, or editing them from wordpress and looking at the last part of the URL).
I hope to have helped people-too-lazy like me
(sorry for my English
)
Last edited by pepsi; January 18th, 2011 at 05:14 PM.