• 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • How did you hide the main content box?

    How did you hide the main content box?

    Thread Starter becky.absolute

    (@beckyabsolute)

    When I created the custom post type, I didn’t include editor for the supports option.

    'supports' => array('title', 'thumbnail', 'products'),

    hi the becky,

    I have this same issue currently and am looking for ways to solve it. I think perhaps the answer lies to enabling the editor as a support for the custom post type, but then somehow removing the editor from the visual display for that user specifically, or an entire user level.

    I know there are plugins and code snippets out there for customizing the admin interface…Its like we want the post to have the features of the editor, without the editor itself being displayed.

    Let me know if you’ve had any luck

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issue with Custom Post Types, Custom Meta Boxes, and Media Uploader’ is closed to new replies.