Issue with Custom Post Types, Custom Meta Boxes, and Media Uploader
-
I am currently working on a project that utilizes custom post types with custom meta boxes. In one of the custom meta boxes, I have a textarea that I have applied the WYSIWYG editor on. I would like to be able to embed images into the content of this textarea.
I do have the Upload/Insert buttons added above the editor by using the following code. I do NOT have the main content box (editor) enabled for my custom post type.
<div id="media-buttons" class="hide-if-no-js"> <?php do_action('media_buttons'); ?> </div>
Clicking on the Add an Image icon does open the media interface in a lightbox. I am able to upload an image, however the Insert into Post button does not appear so that I can insert the newly uploaded image into my textarea.
If I upload an image to a post or a page or through the Media Library, the Insert into Post button is available for the image, and I am able to successfully insert it into my textarea.
The only time that I encounter this issue is when I upload an image after spawning the media lightbox from the custom meta box for my custom post type.
I also need to mention that this is only an issue for the textarea with the WYSIWYG editor in my custom meta box. I have tested and confirmed that if I have the main content box (editor) on the interface, the button to Insert into Post IS available for the image.
Does anyone know if this is a feature or if it is a bug? I would really like to get this resolved so that I can move forward with this project.
- The topic ‘Issue with Custom Post Types, Custom Meta Boxes, and Media Uploader’ is closed to new replies.