wp insert post not working
This is not how variables work in PHP. You’re using them before they are defined. They’re not templates that will be replaced later. If you want to use those variables in $new_post then you need to define $new_post inside your loop after those variables are defined. function mic_create_new_page() { global $user_ID, $wpdb; $tableau_post = array … Read more