How to upload images on frontend and get links

I want to upload multiple inages to wordpress media gallery.
Here is my example code:

<form class=”gallery” method=”post”>
<input type=”file” class=”gallery” id=”gallery” name=”gallery” multiple=””>

<input type=”submit” class=”submit” id=”submit” name=”submit” value=”Submit”>
</form>

// php upload images to wordpress

<?php
if(/*images uploaded*/) {
$links = /*images link*/;
echo $links;
}
?>

Read more here:: How to upload images on frontend and get links

Leave a Reply

Your email address will not be published. Required fields are marked *