Client PDF Upload (Catalogue) – Automatically update link to PDF

Steviehype asked
custom-field admin uploads pdf
via

I’ve built a custom WP theme. In the footer is a button to “download catalogue”. The catalogue is a PDF created by the client which is periodically updated.

I’m looking for some pointers on a good way of achieving this:

Rather than expecting the client to upload the PDF to the media library, grab the link and change the button destination (or ask me to do it), I’d prefer it if they just had to go to a page in the admin panel and upload the latest catalogue and the button link updates automatically.

I’m thinking it probably should be a custom plugin, or a theme setting menu. A simple “upload file” button that then asks them to select the PDF on their computer.

I’ve does some initial searches but I’m hoping someone might offer up some suggestions of any existing functions or hooks etc that I could make use of (or an existing plugin it’s lightweight).

Your help is much appreciated and will obviously save me a ton of time! Thanks in advance.


Answer
via

  • Install Enable Media Replace.
  • Upload the PDF and link to it from your button.
  • When it needs to be changed, have the site owner ‘replace’ it.
Share This
Posted in: