-
Notifications
You must be signed in to change notification settings - Fork 10
Description
First off thank you for this plugin. What a nice update to the original. We've been doing some testing and found that child categories get duplicated but parents do not. All posts tested have only one category chosen. We have a sports website so for instance MLB would be the parent and Chicago Cubs would be the child. When content gets aggregated to the main blog any posts that have the parent category, MLB, import without any duplication issues. If we import posts with the child category, Chicago Cubs, the category gets duplicated. Strange as well each subsequent post with the child category continues to duplicate the category. If we have 10 Chicago Cub stories we'll end up with 10 categories and none of them have parents.
I've reviewed the code and I see a section regarding category parent line 363 if ( $term && 0 == $term->parent ) { $category_ids[] = $term->term_id; continue; }
but it looks as if the category has no parent then skip the category insert. I am assuming if the category has a parent then the plugin creates that category. Is there a way to test the parent category and the child category and if they exist then do not create the category?