thanks for your reply popper
so the best way to delete X number of posts with their attachments is this?
(concept just to show the loops)
foreach($posts as $post){
wp_delete_post($post->ID,true);
foreach($attachment_post as $ap){
wp_delete_post($ap);
}
}
I think we could really use another boolean on this wp_delete_post to choose whether we want to delete its attachments too or not.
or maybe another function like wp_delete_posts_and_attachments or something like that?