I’m currently building a custom post type in WordPress and I need to be able to list all attachments inside the edit screen.
I know how to do this on the front-end template, but anyone know the code to use or can be placed in the functions.php page for the custom post type?
Essentially, what I’m trying to do is list all attachments in a checkbox list, then allow the editor to select them to associate with a custom field.
Thanks!
Troy
You need to add a meta box and populate it with the post attachments. It is very similar to the front end code you would use, except you need to save the data.
On admin init:
This is just a simple non working example I wrote off the cuff because what your asking for is basically the same as writing a plugin, maybe this will lead you into the codex.