Tag Info

Hot answers tagged

2

Just for clarity: borrowing from this answer, add the following to your theme's functions.php: function wpse_188427_delete_post_media( $post_id ) { $attachments = get_posts( array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => 'any', 'post_parent' => ...



Only top voted, non community-wiki answers of a minimum length are eligible