Custom Fields
Support General Post Meta fields in Media Details Popup

  • Creator
  • #3388

    Well this is not really a support question but the solution might be useful for others too. I am using the image_advanced field, the single images are linked to the attachment edit popup.

    Now what I try to figure out is how to display the post meta fields in the attachment editor below the WordPress default Caption/description etc. fields - and how to save the meta values.

    A starting point will be the print_media_templates action hook but I can't figure out how to display it correctly. Must work with Javascript and somehow.

    Maybe you can point me to the right direction? I also don't find much online documentation.


Viewing 1 replies (of 1 total)
  • Author
  • #3395
    Anh Tran

    Hi Johann,

    Working with Backbone (which is used to make everything with the media library) in WordPress is a pain. There's no documentation at all in the Codex. There are very few articles about it 🙁

    You can read the source code of Meta Box to understand how to word with This is another great tutorial to start working with Backbone view.

    However, in the WordPress environment, there's no official solution to inject fields into the Media Details Popup for now. This is how we use to open the Media details popup when clicking the edit link. The technique is discovered by funkedgeek on Github.

    I see Jetpack adds some config for Tiled Gallery in the Media popup, which might be a good example how to hack it.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.