I'm building a CMS-to-Wordpress migrator tool, for a custom hand-made CMS. I'm using XML-RPC API with JWordpress wrapper (I also used WordpressSharp, but I found out that it's very limited in comparison to JWordpress).
On Wordpress, I've several categories, grouped like:
Master Category A
=> Sub category A1
=> Sub category A2
Master Category B
=> Sub category B1
In order to import comments for separated categories (on the hand-made CMS each category was a totally different model), I need to retrieve all posts already inserted on WP, grouped by the Master Category.
The wp.getPosts API can take a filter, but it can filter only on post-status or post-author, not on post-meta. Moreover, in JWordpress already exists a wp.getLastPosts(int) method, I tried to retrieve all posts, then filter at application-level, but how can I filter for all posts in a single master category? I have a Page.Terms[] property, and by reading it I can get only the term name. But I can't filter based on the term name, considering that several sub-categories, from different master-categories, have name in conflict.
Aucun commentaire:
Enregistrer un commentaire