Plugin Author
odude
(@odude)
Well for that you need to little hard because no ready layout is available.
You need to edit/update form’s personal layout where multi input file fields is inserted.
After updated use shortcode as [upg-attach layout=”personal”]
I tried changing the the input field to multiple, but it doesn’t seem to be working correctly. For example, if I upload two photos, they will both be added as posts to UPG, but only the first one will display in the page gallery. If I edit the posts, I can see that only the first post has the “attached at” value for that page. The other photo has no “attached at” value. Is there a simple fix for the code to make sure all the photos receive the “attached at” value?
Thanks!
Plugin Author
odude
(@odude)
Yes, it may happen.
Actually upg-attach is built for one file at a time. I have to look into the code and change the function according to it.
I cannot sent you the fix right now but will try to make to for next update.
Thanks for looking into it. I found the following code in the functions.php file. Is there a quick way to modify this, maybe using a foreach loop? I’ve tried a few things, but don’t have the coding skills to make it work.
//Attach post id if the gallery is attached to specific post.
if (isset($_POST[‘form_attach’])) {
add_post_meta($post_id, ‘form_attach’, $_POST[‘form_attach’]);
add_post_meta($post_id, ‘media_private’, $_POST[‘media_private’]);
//$response[‘srv_attach’]=”Media attached to “+$_POST[‘form_attach’];
}
Thanks!