Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a JPEG)? CLARIFICATION: the thumbnail does not need to be automatically generated (it could be a separate upload)
The use case here is a document library, where you have a little screenshot of what that document looks like but when you click the attachment, you can download the original document.
Good news for this old question, since WordPress 4.7, pdf’s thumbnail are automatically generated.
Basic HTML?
When you insert and image there is a field for the url called Link URL, you can just put your download url there.
Please at least explain the down vote, I’m pretty certain this answers the OP’s question.
WP-Filebase ended up being the free plugin solution we went with. This is actually a pretty cool plugin with a lot of power under the hood, though the interface is far from slick. When you upload any kind of document, you have the option to go to an “Advanced” upload form, which allows you to upload a separate thumbnail for the document. Then, when you decide to list the document, whether using shortcode, or automatically linking the doc to a page, you’ll see the thumbnail instead. Unfortunately, no ability to generate / manipulate / scale the thumbnail unlike the native Media upload process. Still, it’s a useful tool with some basic Document Management features that make it a good fit for small DMS requirements.
Try this plugin. It has features that you need:
Advanced Custom Fields
Its free, But if you need repeater feature, you’ll need to purchase the license key.
WordPress already have the mechanism. We solve this by adding support for post-thumbnail (featured image) for attachments, and handle the representation for each file as normally do for other post types. (if has post thumbnail: the_post_thumbnail() etc etc.) Just add to functions.php:
Make shure to make the template files to look for the thumbnail, or filter in by hooks. There are plenty of ways to implement this solution. It feels a little confusing at the beginning to have featured image for an image, but its really handy for many objectives. You can also filter in to “read” this in Library table etc etc.