Make image appear when PDF is linked from body content
I am working on moving a non-profit organization’s static (HTML-based) site to WordPress.
The organization’s site, which is well-established, has many PDF files, and will continue to offer PDF files for download.
To that extent, we have a standard block of text that we display on all pages containing links to our assortment of on-site, as well as many off-site PDF files.
We work with many volunteers, via the Internet, who do a lot of coding for us, and will continue to do a lot of the work on the backend. Some volunteers are long-term, others, mostly high-school and college students, work with us anywhere between a couple of weeks to a few months. Because of that, we are trying to figure out the easiest way to make things happen without having to write a complete manual detailing each and every step, such as, “If there is a PDF file, add this code…”
What we use is a simple block of text, giving the standard information about PDFs, how to open them, and where to download PDF readers. What i want is for it to display automatically at the end of post or page when the body (not sidebar content) contains a link to a PDF file.
To accomplish this in the easiest way, I was considering coding it into the template for the section. That’s where I could use help on making this happen without a hitch.
I did consider the idea of creating a specific template, but that would require one template for each specific section, and the volunteers remembering to use that specific template.
Because the volunteers, as I said, sometimes are with us for a short time, often working on many pages at a time, and doing all the work remotely, this is something we’d rather make as simple as possible, with as few possible problems and as few things as possible to remember. Basically, we are trying to work out all possible problems, making the system as error-free and automated as possible.
- The topic ‘Make image appear when PDF is linked from body content’ is closed to new replies.