What I need:
- User uploads pictures in a gallery via
WordPress Media Uploader
and publishes them in a post. Let's saypost_id = 1
and the post is:[gallery ids"1,2,3,...,n"]
- I need a function that gets all image-ids of
post_id = 1
in this gallery. - The images should be liked to '.../post-title/attachment/image-title'
I've tried :
$attachements = query_posts(
array(
'post_type' => 'attachment',
'post_parent' => $post->ID,
'posts_per_page' => -1
)
);
var_dump($attachements);
My output is:
array(0) { }
Am I just too stupid?