“Unlink” an attachment from its parent?
-
Hi,
I added an image to a post. Now, that file is “attached” to the post. When I output the content of the following, I get its attachments:
$args = array( 'post_type' => 'attachment', 'numberposts' => null, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args);
However, even if I delete the image from the post, the image remains “attached” to the post. Is there a way to “unlink” an image from its parent post without having to delete the file?
Rémi
- The topic ‘“Unlink” an attachment from its parent?’ is closed to new replies.