Support » Plugin: CSV Importer » How to Download Current Posts for Structure?

  • My current posts have a structure.. with another plugin managing some of the custom fields.

    The big problem is I don’t know how to know what all I should put in the excel worksheet.

    Shouldn’t there be a download current posts option on this plugin so we can work out the column names?

    Surely it make sense or if not – does anyone have instructions for this?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Hmm. that sounds like a good feature to have. I’ve considered including template files, but this would make analysis for importing a lot easier.

    The following sql query will give you the data you need to build the spreadsheet, but with the taxonomies and postmeta, it would take a bit more doing to get them all on one row by just using a sql query.

    column names for postmeta is the meta_key
    column names for taxonomies is csv_tax_(taxonomy name) – precede values for heirarchical taxonomies with a comma

    post_title as csv_post_title,
    post_content as csv_post_post,
    post_type as csv_post_type,
    post_excerpt as csv_post_excerpt,
    post_date as csv_post_date,
    post_name as csv_post_slug,
    post_parent as csv_post_parent,
    u.user_login as csv_post_author,
    tt.taxonomy,, t.slug,
    pm.meta_key, pm.meta_value
    from wp_posts p
    join wp_users u on p.post_author =
    join wp_term_relationships tr on tr.object_id =
    join wp_term_taxonomy tt on tr.term_taxonomy_id = tt.term_taxonomy_id
    join wp_terms t on t.term_id = tt.term_id
    join wp_postmeta pm on = pm.post_id
Viewing 1 replies (of 1 total)
  • The topic ‘How to Download Current Posts for Structure?’ is closed to new replies.