How can I add an "Attach image to this post/page" link on the Add Media lightbox?

My theme uses attached images to generate sliders. I want to be able to attach images from Media Library to the current post/page (the one I'm editing). How can I hook into the Add Media window to add a link?

enter image description here

  • Why don't you just enable post thumbnails? – Krzysztof Grabania Jul 28 '16 at 10:57
  • What's that? The images are not attached, so I can't use thumbnails. – Ciprian Jul 28 '16 at 10:58
  • You want to attach multiple images to post/page and generate slider with that images? – Krzysztof Grabania Jul 28 '16 at 11:00
  • Yes, and the images are already in the Media Library. I don't want to INSERT them, I only need to ATTACH them. The theme does the rest. – Ciprian Jul 28 '16 at 11:01
  • By post thumbnail you can select already inserted image, but only one to post/page. I have no idea how this could be changed to work with multiple images – Krzysztof Grabania Jul 28 '16 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.