Making a Custom Post Type Publish Loop
if ( $posts->have_posts() ) { while ( $posts->have_posts() ) { $posts->the_post(); wp_publish_post($post->ID) } } That should do it. You need the call to the_post to walk through the post set properly. It also sets up the $post object. That should set all of the posts to ‘publish’, which is what wp_publish_post does. I guess I … Read more