Add new media uploader at frontend for wp 3.5+

I create a form for user to submit content from the frontend. The only problem is I don’t know how to handler the image upload.

So, I want to know how to use the WP media uploader in the frontend. The media uploader should be appeared like in the ‘wp-admin/media-new.php’.
I don’t want the pop up version of the uploader, as it seen in post/page page. Because it has other feature that I don’t want user to use, such as ‘Media Library’, ‘Create gallery’, ‘Set Featured Image’ etc.

Read More

Is there any tutorial or documentation on how to do it?

Thanks

Related posts

3 comments

  1. Add this code to your theme’s functions.php file:

    function add_media_upload_scripts() {
        if ( is_admin() ) {
             return;
           }
        wp_enqueue_media();
    }
    add_action('wp_enqueue_scripts', 'add_media_upload_scripts');
    

    This will cause the the media upload files to load on your front end pages. If you would like to load them only on one specific page where they will be needed, you can wrap wp_enqueue_media() in an is_page() statement to check to see if the page being displayed is the specific page you need.

    After that, you can follow the instructions in this tutorial: http://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/

  2. Here is the results from a Google search I did and here is a plugin that will allow you to upload from the frontend of your site Frontend Uploader

    That should get you started in a good direction as far as tutorials that be available.

    Good luck

Comments are closed.