0

I am working on an archive-like wordpress powered website. Now I am thinking about how to speed up the content uploading process.

Normally you would need to register every person first via the wp backend and then relate one or more projects to that person. What I am asking is, whether or not you can automate that process of manually adding a new entry for every person. I have the data for the custom "person" post-type in a excel table. Is there a plugin or another way to speed that up?

Thank you!

lkssmnt
  • 45
  • 12

1 Answers1

1

/* EDIT */

Just found this plugin. You can Import from JSON to Post

https://wordpress.org/plugins/json-importer/

+

How to Export Excel to JSON

/* EDIT-END */

Don't know if there is any plugin for this.

But i would go another way. You can create an php file and use wp_insert_post() to insert the informations from JSON or CSV.

// Create post object
  $my_post = array();
  $my_post['post_title'] = 'Person Name';
  $my_post['post_content'] = 'Information about Person.';
  $my_post['post_status'] = 'publish';
  $my_post['post_author'] = 1;
  $my_post['post_category'] = array(8,39);

// Insert the post into the database
  wp_insert_post( $my_post );

https://developer.wordpress.org/reference/functions/wp_insert_post/

Answers that may help:

https://stackoverflow.com/a/34435434/10909061

https://stackoverflow.com/a/19187094/10909061

ArtCore7
  • 133
  • 1
  • 5