I'm working on a plugin which uses custom post types. When creating or editing one of these custom post types in the WP admin backend, one must be able to select or upload a custom background image from the WordPress media gallery/library (for that post particular). So I want to be able to bring up the default WordPress media library in the backend.

Is there a function / hook / api available to call the WordPress media gallery admin window?

I Googled the entire afternoon, but I don't seem to get the results I need.

P.s. I know that I can use the featured image for that purpose, but I want to preserve the featured image for the user.

  • First tutorial I found - WPTuts – Howdy_McGee Jul 1 '14 at 14:40
  • This has been answered here numerous times, please click your tag or search the site. – Wyck Jul 1 '14 at 15:33
  • I searched the site once again and checked the first 10 result pages of the tag. Either I'm not looking correct or my question is not clear, but I still can't find what I need. Only lateral related questions. – Toine Jul 2 '14 at 6:41
  • That WPTuts link is outdated and unnecessarily complicated. This short tutorial is what you want. – John Blackbourn Jul 3 '14 at 0:01

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.