Display attachments file when just added
-
Hi,
it’s the first time IIm working with attachments and I’m trying to get wp to display the attached files in the edit panel, just so as to get a visual confirmation (my end user’s gnna be someone with little knowledge of the tools) that the right image is there. Very basic indeed.
So far I got wordpress to display said attachment (if any) when opening the edit panel of a post which has already received its attachment, but in the idea of ergonomy, I’d like that to happen at the very moment the file is uploaded and attached to the post.
So I tried a hook with:
add_action('add_attachement','display_attached_img');
But that doesn’t seem to do anything. The function called is the right one, because it works when I open the page in the edit panel.
There must be something that I don’t get with the hook of add_attachment. When is it triggered? Can it call my theme function.php? I’m a bit lost there, and can’t seem to find concrete info on the web.
thanks a lot for your help!!
Fresh
- The topic ‘Display attachments file when just added’ is closed to new replies.