wp_insert_post add meta_input
In the documentation of wp_insert_post there is a changelog on half of the page which says the following: Since: WordPress 4.4.0 A ‘meta_input’ array can now be passed to $postarr to add post meta data. I’m using WordPress 4.4.2. I’ll try to add a new post by running the code as follows: function handle_post($post) { … Read more