statamic / wordpress-to-statamic-exporter

One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Statamic's JSON import format
GNU General Public License v2.0
43 stars 13 forks source link

Plugin doesn't export custom taxonomies #6

Open rosswintle opened 5 years ago

rosswintle commented 5 years ago

As described: Plugin doesn't export custom taxonomies

It exports categories and tags, but nothing else. I suggest two phases:

Initial MVP: export all taxonomies for all posts by looping through the output of the WordPress get_taxonomies() function instead of just doing tags and categories

Better, phase 2: Add an interface for selecting taxonomies to export.

I'll try to build, test and PR this at some point because I kinda want it.

rosswintle commented 5 years ago

I'm working on this now. Thought I could do it quickly on a quiet morning, but taking a little longer to get right and test properly.

Fix for this should also fix #14.

It's worth discussing tags and categories.

Currently the exported exports tags and categories. My change is going to look through all of the taxonomy names in WordPress and the internal taxonomy names are post_tag and category respectively.

Statamic will import these, of course, but they will be named differently to the default content that you get when you install Statamic. It all hangs together and works, but we'll need to make a quick call on if we're happy with the taxonomy names being imported to Statamic being post_tag and category as they are internally in WordPress.

I, personally, think that this is the right thing to do.

rosswintle commented 5 years ago

Note to myself: WordPress also has taxonomy meta now, which probably maps to the items in the fieldset in the Statamic taxonomy. I should explore if we can export the taxonomy meta too.