I have categories named in russian and slugs are translations, not transliterations according to the rules. In the feed, only the category names are exported; so, finding the category among my categories on syndicating site will fail and new category will be created with name, matching the category that already exists.
Solution: either start to export a slug or start picking categories by name.
For me, adding in ESS_Import, line 339
$category_term = get_term_by( 'name', $category_name, EM_TAXONOMY_CATEGORY );
and changing the wollowing code to
$term_array = wp_insert_term( $category_name, EM_TAXONOMY_CATEGORY, array('name' => $category_name));
solved the problem.
I suggest to do both.
- The topic ‘Finding event category by slug is not always a good idea’ is closed to new replies.