Did you know ever wanted to have a on a page a gallery of some post’s images? Or maybe on a post, a gallery of some other post type’s images.
Yeah, me too.
It so happens that you can, without any plugins and the such.
The [gallery] shortcode accepts an id parameter (among others) that allows you to pass the post’s ID number to get the images from. So, for example:
will create a gallery taking the attached images of the post that has ID 123. It doesn’t matter if post 123 is a post, page, or a custom post type. They are all the same to WordPress.
Gotta love WP :)