Forums

CSV Importer
Post-parent ID field - can it use post title or post slug as well? (6 posts)

  1. dains
    Member
    Posted 6 months ago #

    Hi, first off, I'd like to say that this plugin is a very good effort! There's a huge need for mass import of content for new websites and conversions of existing sites, so I'm very glad to see something this functional out here (and will add it to my donation list for when the site goes live).

    I do have a question / feature request. While there's a strong mechanism for categories and subcategories, there doesn't seem to be one for making page trees? Adding the post-parent ID can only be done once the parent page exists in the system, so the tool doesn't seem to be able to put up page trees in the same way you can do category trees.

    So I'd like to ask if a) I'm wrong and there IS a way to do page trees from scratch, and b) if I'm not wrong, is it possible to tweak the post-parent field code so it can use a sequence of page titles or slugs instead? Something like top-parent-title > first-child-title, which would add the page as a child of first-child-title.

    Using a spreadsheet, this structure can be created via concatenating the page title or slug fields with a ">" cell, so while a manual operation, there is a somewhat efficient way to get the relationship into the right field. I just need a way for the plugin to apply that relationship.

    Thanks for any help!

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

  2. tainsc21
    Member
    Posted 4 months ago #

    dudddeeee

    what the heck are the post titles even suppossed to be named?

    I read somewhere that there is a sample file but I dont see it anywhere.

    Please help

  3. tainsc21
    Member
    Posted 4 months ago #

    where is the so called "test file" that they claim comes with the plugin??

  4. dains
    Member
    Posted 4 months ago #

    In the plugin directory. If you used WP to automatically install it, you will need to download the plugin manually to get the sample files.

  5. Joy
    Member
    Posted 3 months ago #

    Right now the code just sets the parent to the number you provide in the CSV file. It could be changed to do a lookup if the value is not a number.
    See http://wordpress.org/support/topic/plugin-csv-importer-featured-image for how I modified one function to do a lookup for attachments.

  6. dains
    Member
    Posted 3 months ago #

    Thank you Joy! I'll take a look at it tomorrow (today actually arggh) and see if I can work that out. I'll send the code your way if I have any luck.

Reply

You must log in to post.

About this Plugin

About this Topic