Apr

12

csv 2 post updates

April 12, 2008 |

‘ve improved (I hope) the csv to post import plugin to support multiple categories and excerpts. csv Basically the header row should/may look like this:

wp_title|wp_post_date|wp_category|wp_category|wp_excerpt|wp_content|field1|field2

See my original post on the csv to post importer plugin to make sense of this. Please give me your feedback if you have tested it. Thanks!

Special note on importing categories and subcategories

Ok guys, here’ s the problem. One post might fall under several categories. The importer now lets you import a post under several categories. I’ve tested it and works good for me. The issue is that you might want one category to be a subcategory of another. Rather than create some funky syntax for the csv, like

wp_title | wp_post_date        | wp_category | wp_content      | cylinders | etc..
Mustang  | 2007-12-31 23:59:59 | ford > cars | <p>nice car</p> | v8        |

which could get REALLY messy if you had a lot of subcategories, I decided to make a Category Importer
This works the same way as the post importer.

  1. Download Category Importer.
  2. Unzip and up load the file called csv.php to /wp-admin/import/
  3. Prepare your csv file, here is a sample_category_file. It’s really a pipe delimited file. It MUST follow this format or it will not work. This is an example of what it should look like:

Yes this requires more work, you need to prepare a category file making sure you list the parent categories before the subcategories. After you do this, you can use the regular csv to post plugin listing all the categories you want the post to be listed under.

If you found this plugin useful, help pay for my kids college fund:



Comments

Name (required)

Email (required)

Website

Speak your mind

11 Comments so far

  1. Ludo on April 15, 2008 6:43 am

    this plugin is really good it works very well. Do you think add it the importation of tags?

    thanks

    Ludo

  2. Daniel on May 4, 2008 11:37 am

    Hello Zack,
    about Field Layout Manager.
    work wp-2.5?

  3. Marco on May 7, 2008 1:18 pm

    Sorry to abuse the comments field but i couldn’t find an email address.
    It’s about your plugin: Field Layout Manager. This THE most usefull thing i’ve seen on my LONG search to be able to add more fields to for instance photo’s (i’m trying to make a site in Wordpress for a friend of mine who sells cars)

    I saw your site “Encyclomoto” and followed the short setup.
    Got stuck however on point 4: (i think)
    “Add function call to template:”
    I added it almost everywhere but it doesn’t appear. Where do i put it ?
    In index.php, single.php, page.php ?
    Where exactly ?
    I realy hope you can help me because this is the only solution out there and more than 100% suits my needs.

    Kind regards,

    Marco

    p.s. I’m using WP 2.3 Dutch

  4. admin on May 8, 2008 2:46 pm

    Hi Marco,

    Sorry for the delay. Instructions are here:

    http://www.encyclomoto.com/wp-plugin/

  5. Max on May 19, 2008 10:42 am

    Thanks for your great script.

    There might be 2 problems that I found:

    1. If I post to more than 1 categories, I need to have something like this in the csv file:

    …..|wp_category||wp_category||wp_category|….
    …..|cat1|cat2||
    The post will under –> “cat1″, “cat2″ and ” Uncategorized”.

    It’s strange your script assign the post to Uncategorized as well. It’s very hard for me to make all posts to have the same number of categories.

    2. The Scheduled post is not working. I mean it will appear as Scheduled post in the control panel, but it won’t show in the front page when the date come.

    I have modify the script to support tags import. If you are interested, I can email it to you. Thanks.

  6. admin on May 19, 2008 7:40 pm

    Hi Max,

    Would love to see your mods. Maybe I can integrate them.

    Zack

  7. Max on May 19, 2008 10:52 pm

    Hi Zack,

    Since I don’t know your email. You can get the script here:

    http://www.site2nd.org/wordpress/csv-import-to-wordpress/

    Thanks.

  8. P4C3 on May 22, 2008 10:32 am

    “Warning: Cannot modify header information - headers already sent by (output started at /home/xxx/public_html/wp-admin/admin-header.php:16) in /home/xxx/public_html/wp-includes/functions.php on line 1221″

    Same the still problem … :( What am i doing wrong? :(

  9. admin on May 22, 2008 12:23 pm

    Hi Peter,

    That’s really weird. Is that happening only on the category importer or on both?

  10. P4C3 on May 23, 2008 2:39 am

    It’s happening on the post import.
    Wordpress version: 2.1.3.
    I’m trying with this file content:
    wp_title|wp_post_date|wp_category|wp_content|Image
    3d swat|2008-05-17 10:00:59|Sport|test test|3d-swat.jpg

    (Image is a custom field, to show thombnails to posts)

  11. P4C3 on May 23, 2008 2:40 am

    Sorry, i forgot to close the tag :(

Blogroll

Links