Support

Account

Home Forums Backend Issues (wp-admin) Populate Select field with files in media library Reply To: Populate Select field with files in media library

  • The easiest way would be to create a file field and set the allowed file types to .pdf. This will only allow the editor to select pdf files from the media library.

    If you want to do this the hard way you could https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/. You’ll need to do a query of the attachments to get all the pdf files to use to do the population. I’m not sure how you’d do this but this looks like it might do the trick https://wordpress.stackexchange.com/questions/22069/is-it-possible-to-query-specific-wordpress-attachment-files-ppt-pdf-and-ou