I’m developing a theme with an built-in gallery outside of the post content. So what I want to do is to allow editors to attach images to a page/post without inserting them.
Kind of like the featured image, but with any number of images.
Just a nice UI for uploading, and leave it to the theme to render it.
I looked at some plugins, especially NextGen Gallery, but so far they all work by inserting a shortcode in the post body.
You don’t have to insert image into post after attaching it to this post.
When you edit post, click on ‘Add Media’ button. Upload your image and when it’s uploaded just close the ‘Insert Media’ dialog (use ‘x’ button in top right corner and not ‘Insert into post’ button).
You can then get (and show) them with this code:
You could also use
get_children
function to get these attachments (see below).