WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: CSV Importer] Import to Custom Post Type? (18 posts)

  1. Ian
    Member
    Posted 3 years ago #

    This plugin is pretty much awesome. Totally amazing database tool.

    The new custom taxonomies update is going to make my life a million times easier.

    The only thing left I have to ask for is if it could also have a field for custom post TYPES. Is this possible? Is there a way I can do it now somehow?

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

  2. Ian
    Member
    Posted 3 years ago #

    Any ideas?

  3. scott.hack
    Member
    Posted 3 years ago #

    I am also having the same issue. I'd like to import into a custom post type, but I don't currently see that as an option.

  4. dvkob
    Member
    Posted 3 years ago #

    I'll add custom post types to my list of feature requests.

  5. Roy
    Member
    Posted 3 years ago #

    Let me add my vote :-)

  6. Ryan Miller
    Member
    Posted 3 years ago #

    Plus 1. Seems like a natural progression of the plugin.

  7. mikemotorcade
    Member
    Posted 3 years ago #

    I agree. Can't wait!

  8. pinman
    Member
    Posted 3 years ago #

    Another vote from me :)

  9. dvkob
    Member
    Posted 3 years ago #

    Support for custom post types has been added in 0.3.2. Grab it while it's hot! :)

    Thanks for your votes. I would also be very interested to read more usage reports to help me think about new features and ways to make the plugin better.

  10. bluebird2
    Member
    Posted 3 years ago #

    Suggestion: import them as regular pages and then convert them to the intended Custom Post Type using another plugin.

  11. M
    Member
    Posted 3 years ago #

    dvkob, this new custom post types is perfect for what I needed in my CMS site. Have you thought about adding something like adding a cron functionality to import daily content? Do you have any suggestions on how to do this with the current version of the plugin?

  12. ellie.roepken
    Member
    Posted 3 years ago #

    I actually had to hack this plugin in order to get custom post types to work. I'm running 0.3.3.

  13. Jay Collier
    Member
    Posted 3 years ago #

    ellie.roepken, could you share how you hacked to get this to work?

  14. Jay Collier
    Member
    Posted 3 years ago #

    I changed the cells in the column "csv_post_type" in sample.csv to my type ("towns") and imported. Those items were not brought into that post type.

    I'm using GD CPT Tools to create the custom post types, and everything else works fine.

    Looking for a fix or an alternative.

  15. ellie.roepken
    Member
    Posted 3 years ago #

    I changed line 228 of csv_importer.php:
    post_type_exists($type)) || in_array($type, array('post', 'page'));

    Where it says in_array($type, array('post', 'page')), add your custom types to that second parameter.

    I.e.: in_array($type, array('post', 'page', 'book', 'article'))

  16. Jay Collier
    Member
    Posted 3 years ago #

    Thanks for the hack and your note in the related thread.

    http://wordpress.org/support/topic/plugin-csv-importer-importing-into-custom-post-types-not-preserving-taxonomies

    However, I did find a premium plugin, TurboCSV, that supports custom post types, custom taxonomies, and custom fields. I had one issue, but the developer responded quickly.

    http://wphostreviews.com/turbocsv

    That said, I spent quite a few hours seeking a complete workflow for custom post types and taxonomies -- from entry to management to queries (missing in core) to presentation -- and have decided to wait until the support is more mature.

  17. dvkob
    Member
    Posted 3 years ago #

    M: Did you consider scheduling posts using csv_post_date column?

    ellie.roepken: According to the WordPress Codex, you are supposed to register you custom post type, hence the post_type_exists() check.
    http://codex.wordpress.org/Function_Reference/register_post_type

  18. FreshGroundNews
    Member
    Posted 2 years ago #

    Well... I tried the ellie.roepken hack.
    The CSV-Importer does not recognizing the categories or tags of my Custom post type. The CSV-Importer only sees the categories of Post post_type.
    If the uploaded category already exists in a Custom post type, CSV-Importer creates a child category, in the Post post_type, using the uploaded category data and using the same term_id number. (http://www.xxxxxxx.xxx/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=88&post_type=post)
    If the uploaded category does not exist at all, it sets up a new child category, within the Post post_type, with a new term_id, using the uploaded category name. (http://www.xxxxxxx.xxx/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=153&post_type=post)
    If you are using a Post post_type, the CSV-Importer does recognizes existing tags, or if the tag name does not exist, creates a new tag with a new term_id.
    The good news is the CSV-Importer does recognize the csv_post_title,csv_post_post,csv_post_type,csv_post_excerpt,csv_post_date and the custom fields and places that data in the Custom post_type directory appropriately. However, tags are not recognized and only created if using Post post_type.
    No Term Relationships are established within the term_relationships data base table. (term_taxonomy_id was not associated with an object_id) either categories or tags, unless using Post post_type.

    Basically, I want the CSV-Importer to recognize my existing Categories and Tags within my Custom Post Type.

Topic Closed

This topic has been closed to new replies.

About this Topic