Home » Wordpress » How to use media uploader in wordpress custom plugin

How to use media uploader in wordpress custom plugin

If you’re developing own wordpress plugin may be you have to use upload image in the custom field.So in here i’m going to explain all how to use media uploader in your wordpress settings page.

How to use media uploader in wordpress custom plugin

This is my folder structure.
How to use media uploader in wordpress custom plugin

My main file is index.php.There I’m adding wordpress code functions to fetch related files.

Now I’m adding my js file named admin_script.js into settings page.

Okay.Next step is adding html fields to settings page(settins.php) of my plugin page.

Now add the js into the admin_script.js file.

After added all you can see it in admin page as following.

How to use media uploader in wordpress custom plugin

Tags

Similar posts