WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a seperate database with lists of users, brochures and brochure URL's, and timestamps of when a brochure was ordered, but I want my database to update everytime a brochure (PDF) attachment is updated in the admin back end of wordpress.

When a user requests a brochure they receive a reminder after a few days wiuth a link to the PDF they requested. I have most of it figured out I just need to know how this link can constantly link to the latest PDF of the brochure they requested.

Thanks :)

share|improve this question
up vote 1 down vote accepted

You can hook into add_attachment and/or edit_attachment actions and carry out an update on your separate database with the appropriate info. In both cases the attachment ID seems to be the only argument but you can easily get_post or get_post_meta if you need anything else.


share|improve this answer
Thanks that is all I need to know :) – JamesG Nov 28 '11 at 10:41
You're welcome :) – kovshenin Nov 28 '11 at 11:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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