[wp-hackers] Newbie Q - can't get get_children to work
Jan Erik Moström
lists at mostrom.pp.se
Sat Apr 11 19:05:19 GMT 2009
On 09-04-11 at 20.54, scribu <scribu at gmail.com> wrote:
>An image is attached to a post if it has the post's id is in the
>"post_parent" column in the wp_posts DB table, not if the URL is in the
>post.
When does that column get filled in?
From my experiments it only seem to happen when I put a URL to
the image in a post.
(note that I'm doing this from a blog editor that first uploads
the image and then allows me to use the URL to this image)
Also, I took a quick look at the database schema - am I correct
that that each image can have one parent? What happens if I use
one picture in two different posts, will I be able to find the
image using get_child from both these posts?
jem
--
Jan Erik Moström, http://mostrom.eu
More information about the wp-hackers
mailing list