4

I am new to theme development. I am trying to create a custom metabox that has the ability to upload a image. I am doing this on a page not a post. I want to output the images (multiple) onto the page in a unordered list. I have attempted to use WP alchemy, and I can only get as far as getting the metabox to show up but I have no idea on how to output the imgurl to the page. Is there a better way to upload multiple images to a page which is easy for a client and doesn't add images to the content editor (I just think it isn't user friendly) and then output them to a page in a unordered list. Some advice please.

1

2 Answers 2

6

That's pretty advanced and it doesn't sound like you are all that comfortable with WP yet, no offense. You can definitely do this with WP Alchemy (I have and do), but you really have to get down and dirty with some Javascript to 1. launch the media uploader and 2. to hijack the send to editor function.

some good reads:
http://austinpassy.com/snippets/wordpress/creating-custom-metaboxes-and-the-built-in-uploader/
http://www.krishnakantsharma.com/2012/01/image-uploads-on-wordpress-admin-screens-using-jquery-and-new-plupload/

As far as alternatives: you might want to try the the Metabox class by Rilwis.
http://www.deluxeblogtips.com/meta-box

or Advanced Custom Fields http://www.advancedcustomfields.com/

Both are much less DIY than Alchemy. I'm pretty sure the one by Rilwis even has the plupload drag and drop uploading and a simple way to turn on repeating fields.

4
  • Thanks for the response, I think I am going to try acf plugin for now. I have gotten my feet wet and I really want to figure this stuff out. I am going to a wordpress talk about development in the next couple of weeks so I should get some good advice there as well. Commented Mar 15, 2012 at 19:34
  • @helgatheviking May I ask you to expand the w/? You have all the room you need for your answer. :)
    – fuxia
    Commented Mar 15, 2012 at 19:40
  • welcome. glad it helped. toscho - done. not a question of lack of space. just habit by now. Commented Mar 15, 2012 at 19:55
  • Just a YouTube link with example how to do basic media uploader with WPALCHEMY youtube.com/watch?v=bZJaZDNXPhg
    – jave.web
    Commented Aug 21, 2015 at 12:23
2

I code a plugin today allowing this feature. It is very simple to use : Install the plugin and activate it. You can now link multiple images to your posts by the way of metabox. Pictures can be reordre in drag & drop.

Number of picts and targeted post types can be overited by hooks.

http://wordpress.org/extend/plugins/multi-image-metabox/

1
  • Thank you. Is this come with saving and retrieving the images?
    – Ari
    Commented Apr 23, 2016 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.