WordPress.org

Ready to get started?Download WordPress

Forums

CSV Importer
Loading with parent-only term in hierarchical taxonomy (1 post)

  1. TCBarrett
    Member
    Posted 2 years ago #

    I'm loading posts that belong to the parent term in a hierarchical taxonomy. If they do not belong to a child term, then they are not added to the list of term_ids to assign the post to.

    I changed csv_importer.php around line 410 from:

    if ($parent_ok) {
                        $child_info = $this->term_exists($child, $taxonomy, $parent_id);

    To:

    if ($parent_ok) {
                        if( !$child )
                          $term_ids[] = $parent_id;
    
                        $child_info = $this->term_exists($child, $taxonomy, $parent_id);

    A bit cheap and dirty, but it did the trick for me.

    http://wordpress.org/extend/plugins/csv-importer/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.