Having a perplexing issue... ...for a custom post-type called 'Resources' I used the 'Featured Image' or 'thumbnail' function within WordPress to allow users to attach documents to 'Resources'. The process itself works exactly as expected and anticipated.
However, setting the site up, someone made a mistake and uploaded two documents and assigned them to the wrong 'Resources'. So Resource A -> Document B
and Resource B -> Document A
.
When attempting to switch them and clicking 'Edit Featured Image' you are unable to see any of the documents. They clicked 'Remove Featured Image' and then 'Set Featured Image' and when the dialogue opens, still no documents.
In the Wordpress Media Library all of the uploaded and attached documents are there. Visible, with previews, etc. As expected. Here's the first two rows of the Media Library. You can see tons of PDFs that have been successfully uploaded.
The only place where this issue appears is that in the actual 'Featured Image' media dialogue box, WordPress will not display any PDFs.
Here's the CPT supports segment:
$rsc_supports = array(
'title',
'editor',
'thumbnail',
'page-attributes'
);
Like I said, everything works perfectly - even uploading and attaching PDFs as 'thumbnails' to be associated as attachments with the CPT. When a PDF is attached and you 'Click to edit' the dialogue opens up and you can see the attached PDF in the list.
The only failing is that the 'Featured Image' modal/pop-up/dialogue box that loads, is designed to filter out everything except images.
This is what that dialogue box looks like on a 'Resource' with nothing attached.
However, if you view another Resource that does have a PDF already attached, you get this:
I have tried the filtering and date dropdown and they don't address this.
I believe this is by design. So my question is, "How do I modify that dialogue box to display all files rather than just images?"