WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager ESS
[resolved] Finding event category by slug is not always a good idea (3 posts)

  1. dnk6742
    Member
    Posted 6 months ago #

    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.

    http://wordpress.org/plugins/events-manager-ess/

  2. essfeed
    Member
    Plugin Author

    Posted 6 months ago #

    Hi,
    I see your problem.., it's a sounds a good idea to do the matching with the name. I've replaced the evaluation script with 'name' instead of 'slug'.
    As it only concerns languages with special chars it shouldn't disturb other websites.

    The fix will be published in the next release.

  3. dnk6742
    Member
    Posted 6 months ago #

    It concerns all sites where slugs are customized :-) Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.