i m trying to import data into as my posts using wp all import and use add_action(save_post,myfunc) to run a function to update some fields all's good so far...but instead of publishing them all at once i want to save it as draft and then randomly publish them.

so how to set the status of the posts imported as drafts. and if possible then is there way to randomly publish these drafts over a period of time(code or plugin recommend would be great)?

  • Can you post the code you are using to import and save ? What do you mean by wp all import, do you mean WordPress import export plugin?
    – bravokeyl
    Jun 13, 2016 at 8:23
  • yes its a plugin wordpress.org/plugins/wp-all-import
    – sonia k
    Jun 13, 2016 at 8:49

1 Answer 1


You can hack this plugin code by changing 'create_draft' option 'no' to 'yes' into plugin.php 'get_default_import_options' method(Approx line no. 1013).

I'm not tested this hack, try it your own risk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.