WordPress.org

Ready to get started?Download WordPress

Forums

WP Export
Not updating - solution (2 posts)

  1. Patrick Hesselberg
    Member
    Posted 2 years ago #

    Heya. First of all thanks for developing this plugin. It's just what I've been looking for!

    It just seems like the records are not getting updated as they should (if there is an ID they should only be updated not created again). The reason to that is first setting $my_post['ID'] to the correct ID but after setting it to '' (to make sure new posts are made).

    This can be resolved by replacing:
    bulk_upload.php, line 188

    $row_update_counter++;
    $my_post['ID'] = '';
    $last_postid = @wp_insert_post($my_post);

    With:

    if($my_post['ID']) {
      $row_update_counter++;
      @wp_insert_post($my_post);
    }
    else {
      $my_post['ID'] = '';
      $row_insert_counter = 0;
      $last_postid = @wp_insert_post($my_post);
    }

    Note that they only UPDATE if you have the ID in your CSV file means that you have to export everytime you make a new post.

    This has been tested in 3.2.1.
    Would others like to test it out and share the result? Please also share version and other info :)
    Thanks

    http://wordpress.org/extend/plugins/wp-export-all-post-information-excel-format/

  2. Patrick Hesselberg
    Member
    Posted 2 years ago #

    Also found a way to export/insert posts by it's post type.

    I'd love some that would like to test it out (and that the author will contact me)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic