• Resolved Ian

    (@ianaleksander)


    For some reason, I can’t seem to get posts to upload with custom taxonomies intact.

    I get the errors:
    Unknown taxonomy (Edition)

    Unknown taxonomy (Creator)

    Unknown taxonomy (Series/Event)

    The taxonomies work fine throughout the rest of the site, and everything else imports perfectly, including custom post types, custom fields, etc.

    This is the code I’m using to do the post types in the functions:

    add_action( 'init', 'create_my_taxonomies', 0 );
    
    function create_my_taxonomies() {
    
    register_taxonomy( 'creator', 'post', array( 'hierarchical' => false, 'label' => 'Creator', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'edition', 'post', array( 'hierarchical' => false, 'label' => 'Edition', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'series', 'post', array( 'hierarchical' => false, 'label' => 'Series/Event', 'query_var' => true, 'rewrite' => true ) );
    
    register_taxonomy( 'dc-series', 'DC', array( 'hierarchical' => false, 'label' => 'DC Series/Event', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'wildstorm-series', 'Wildstorm', array( 'hierarchical' => false, 'label' => 'Wildstorm Series/Event', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'marvel-series', 'Marvel', array( 'hierarchical' => false, 'label' => 'Marvel Series/Event', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'image-series', 'Image', array( 'hierarchical' => false, 'label' => 'Image Series/Event', 'query_var' => true, 'rewrite' => true ) );
    
    register_taxonomy( 'dc-character', 'DC', array( 'hierarchical' => false, 'label' => 'DC Comics Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'wildstorm-character', 'Wildstorm', array( 'hierarchical' => false, 'label' => 'Wildstorm Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'marvel-character', 'Marvel', array( 'hierarchical' => false, 'label' => 'Marvel Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'ultimate-marvel-character', 'Ultimate-Marvel', array( 'hierarchical' => false, 'label' => 'Ultimate Marvel Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'image-character', 'Image', array( 'hierarchical' => false, 'label' => 'Image Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'buffyverse-character', 'Buffyverse', array( 'hierarchical' => false, 'label' => 'Buffyverse Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'hellboy-character', 'Hellboy-Universe', array( 'hierarchical' => false, 'label' => 'Hellboy Universe Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'americas-best-character', 'Americas-Best', array( 'hierarchical' => false, 'label' => 'Americas Best Comics Character', 'query_var' => true, 'rewrite' => true ) );
    register_taxonomy( 'fables-character', 'Fables', array( 'hierarchical' => false, 'label' => 'Fables Character', 'query_var' => true, 'rewrite' => true ) );
    }

    It all seems right to me, but maybe I’m missing something stupid?

    https://www.ads-software.com/extend/plugins/csv-importer/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Quite sure…tried endless variations…
    I’ll search a bit more…thanks…

    A super easy way to get around the hierarchical taxonomy issue when importing is to simply register your taxonomies as non-hierarchical, then import your CSV, then in your code for registering your taxonomies, add the ‘hierarchical’ => true parameter back in.

    @stevecoy — Thanks! I was struggling with how to import MULTIPLE values to a Hierarchical custom taxonomy. This is a bit of a workaround, but it definitely worked.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘[Plugin: CSV Importer] Custom Taxonomies Import not working’ is closed to new replies.