How to use wordpress default media uploader at front end for user images upload
For add wordpress default media uploader at your site front end . just copy and paste below code into your theme's functions.php file or in your custom plugins file For use media uploader first need to add media js file so paste below code into your file function rj_wp_enqueue_media() { if ( ! is_admin() ) { wp_enqueue_media(); } } add_action( 'wp_enqueue_scripts', 'rj_wp_enqueue_media' ); // For give permission to user upload images or file you must need to assign capability to user so add below code into file and change user role as per your requirement add_action('init', 'rj_allow_customer_uploads', 20); add_action('admin_init', 'rj_allow_customer_uploads', 20); function rj_allow_customer_uploads() { global $wpdb; if ( current_user_can('customer') || current_user_can('subscriber') ) { $customer = get_role('customer'); $customer->add_cap('upload_files')...