Separate attachment images from post loop
The best way to assign images to a given post is to just upload them in the WordPress post editing/new post area. You can also delete images from there. With that said, here would be how you do that. You’re going to hook into wp_enqueue_script, and call wp_enqueue_script to add your gallery script to the … Read more