04/19/2013 at 11:41 am
#257504
Keymaster
@ Emily
right, unfortunately, there is no logic to help define which category an entry should be assigned if there are multiple categories with the same name. Importing by ID would be the only option. I’ve been working diligently for the past few months on a complete rewrite. I’ve added this to the to feature list to implement.
Now, I know you have a need for now. If you can make two minor changes to PHP you can change the import from name to ID.
Open this file:
../wp-content/connections-csv-import/submenu/csv.php
Go to line 804. It should be the following:
$term = $connections->term->getTermBy('name', $category, 'category');
Change it to this:
$term = $connections->term->getTermBy('id', $category, 'category');
Now got to line 806. It should be the following
if ( $term->name == $category )
Change it to this:
if ( $term->term_id == $category )
I think that should do it.
