Attach an image to a post with code

If you look at the media library you probably notice that all attachments are attached/unattached to a post. If the attachment is attached to a certain post, actually it’s just set as a child of that post, or its post parent is that post. Since both attachments and posts are post and they are only … Continue reading “Attach an image to a post with code”