• lbbadi1

    (@lbbadi1)


    Hello
    i have a problem to use the shortcode in a metabox. All fileds are shown but when i select a file for upload it’s not shown in the select field and i can’t press the upload button. Are there any problems to use your shortcode in a metabox?

    Thanks for help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nickboss

    (@nickboss)

    Hi, I have never tried to insert the plugin in a metabox. Is the metabox inside a page or post? If not, maybe the plugin’s Javascript and css fils are not loaded.

    Regards

    Nickolas

    Thread Starter lbbadi1

    (@lbbadi1)

    Hi Nickolas

    thanks for your reply.
    I test the metabox on Page and on a own pagetype (course).
    I’ve testet with Java in my g^functions.php and without.
    Your plugin come but when i select a file fro upload the “select” field is not filled with the filename and the button “upload” is not clickable.

    I’ll hope we have a chance to find a solution.

    Thanks a lot Dietmar

    Code:
    function custom_meta_box_markup()
    {
    echo ‘<script type=”text/javascript” src=”/wp-content/plugins/wp-file-upload/js/wordpress_file_upload_functions.js”></script>’;

    echo do_shortcode(‘[wordpress_file_upload multiple=”false” dragdrop=”false” uploadpath=”vendor_uploads/%username%” uploadrole=”administrator,teacher” createpath=”false”]’);

    }

    function add_custom_meta_box()
    {
    add_meta_box(“demo-meta-box”, “Custom Meta Box”, “custom_meta_box_markup”, “course”, “normal”, “high”, null);
    // add_meta_box(“demo-meta-box”, “Custom Meta Box”, “custom_meta_box_markup”, “course”, “side”, “high”, null);
    }

    add_action(“add_meta_boxes”, “add_custom_meta_box”);

    Plugin Author nickboss

    (@nickboss)

    Is there a URL where I can see the page?

    Nickolas

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Upload in a metabox’ is closed to new replies.