How do I add media to a custom post type?

I want to add some custom fields to allow a user to select items from the Media library for the custom post (in the add/edit view)

Is there a way to do this?

Related posts

Leave a Reply

2 comments

  1. You could add

    <a href="#" class="button insert-media add_media" data-editor="content" title="Add Media">
        <span class="wp-media-buttons-icon"></span> Add Media
    </a>
    

    to a metabox