Change 1000+ of WordPress Featured Images in 5 Minutes! › Forums › Questions and Answers › Setting default on posts created programatically › Reply To: Setting default on posts created programatically
The plugin adds both categories and tags at the time of insertion. From the code that adds posts:
$my_post = array( 'post_title' => $publish, 'post_content' => $publish, 'post_date' => date("Y-m-d H:i:s",$publish), 'post_status' => 'publish', 'post_author' => 2, 'post_category' => $publish, 'tags_input' => $publish ); $post_id = wp_insert_post($my_post);
So I’m hoping that this should be enough to trigger the attachment of a default image based on these two attributes and the configuration I posted earlier.