Support » Plugin: CSV Importer » [Plugin: CSV Importer] Custom Taxonomies not importing

  • I have read the other threads in here and still cant get custom taxonomies to import.

    In the readme.txt file it says Top level terms have to be preceded
    either by an empty string or a 0 (zero). But there is no example of this in the custom-taxonomies.csv file.

    I had trouble with excel outputting quotes, but then I tried outputting it from Access instead, which gave me the quotes, but still no luck.

    I have tried adding zeros before the term like: “0, Aged Care / Health” but this had no affect either.

    The only difference I see is that the sample file uses “post” where I am trying to import into “projects” which is my custom post type.

    if (!is_taxonomy('sector')) {
    		'sector', array('project', 'client'), array(
    		'hierarchical' => true,
    		'label' => 'Sector',
    		'query_var' => true,
    		'rewrite' => array( 'slug' => 'sector' ),/* !any permalink url must be unique */
    		'with_front' => false
    		) );
    		wp_insert_term('Aged Care / Health', 'sector');


    If any one has any ideas, it would be appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • It works for me (though the documentation is a bit light). In your example
    "0, Aged Care / Health"
    there is a Space after the Comma, as well as a Slash in the taxonomy term. Perhaps either of these are causing the problem?

    I agree with the people saying that the documentation on how to import to a hierarchical custom taxonomy could be clearer. Here’s what it says in the readme:

    __Hierarchical taxonomies__

    The syntax for hierarchical taxonomies is more complicated. Each hierarchical
    taxonomy field is a tiny two-column CSV file, where _the order of columns
    matters_. The first column contains the name of the parent term and the second
    column contains the name of the child term. Top level terms have to be preceded
    either by an empty string or a 0 (zero).

    This makes it sound to me like there needs to be a separate CSV file with only two columns in it, but this second CSV file isn’t mentioned anywhere else, so I don’t think I understand. Here are the contents of the only relevant column in the example file custom-taxonomies.csv:

    Painting, post-impressionism
    Painting, impressionism
    Painting, cubism
    Sculpture, cubism
    Poetry, aestheticism
    Prose, “fiction, gothic”

    Where does the empty string or zero go? What do the line breaks in the 4th and 5th row signify? I think maybe the “tiny, two-column CSV file” the directions are referring to is the contents of those 4th and 5th rows, and the line break is meant to be a break between fields?

    Plugin Contributor dvkob


    boonofdoom: When I added support for custom taxonomies, I didn’t envision it as such a popular feature, hence the lacking documentation. You did get everything right though.

    The “tiny, two-column CSV file” in the directions are referring to the contents of rows 4 and 5, and the line break is meant to be a break between fields. The empty string or zero can be used as follows:

    Painting, post-impressionism

    Can anyone clarify this please. It’s still really unclear.

    Say I have a taxonomy for videogames:

    -Xbox 360

    -Nintendo DS

    What do I need in my csv file to put a game in the Console, PS3, Xbox and Mobile, Nintendo DS taxs. I’ve tried various combinations of:

    0,Console, Xbox 360, PS3
    0,Console, Xbox 360, 0,Console, PS3

    And so on, but nothing seems to work.

    You rock man! Thanks a lot, your solution worked! That line in the doc doesn’t really go to my head, and the custom taxonomies csv shipped along with the plugin too doesn’t work! They should really change the example csv and the documentation.

    – Rutwick

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: CSV Importer] Custom Taxonomies not importing’ is closed to new replies.