KNOWNHOST WIKI

User Tools

Site Tools


resources:allow-attachments-in-wordpress-comments

How to Allow Attachments in WordPress Comments?

As a default behavior, WordPress restricts comments to just text (with some HTML markup allowed on a very limited scale). However, there are times when it would be nice to allow attachments, just as pics or documents, like Word or Excel, or even text document attachments. The sky is the limit - you could even allow video, if that’s what you wanted.

Enabling attachments in WordPress comments will require a bit of effort in creating a custom function, or you could simply install a plugin that will enable such functionality. The “DCO Comment Attachment” plugin is one of the more popular options for enabling attachments in WordPress comments.

Following the How to Install a Plugin in WordPress steps, locate, install and activate the DCO Comment Attachment plugin.

To set the parameters surrounding comment attachments resulting from the DCO Comment Attachment plugin, go to the WordPress admin panel, using the below steps.

  Settings -> Discussion -> Comment Attachments:

The options available include the ability to specify where the attachment form is placed, how large attachments can be, whether or not it’s required, how to label the form, if it should have the attachment linked and whether or not to include a thumbnail.

Attachment file types can be regulated. Tick boxes allow for any or all types within a given category.

Available attachment categories include:

  1. Image
  2. Audio
  3. Video
  4. Document
  5. Spreadsheet
  6. Interactive (Slideshow)
  7. Text
  8. Archive
  9. Code
  10. Other

Within each of the 10 categories, there are multiple document type choices that can be enabled via tickbox. This means you can allow some, all, or none of a category, with choices available across several categories, if you choose.

It’s a very powerful plugin that allows attachments to be tagged onto comments.

Note: These formats will likely change as the plugin gets developed, updated and popular document types change.

resources/allow-attachments-in-wordpress-comments.txt · Last modified: 2020/06/25 10:11 by Karson N.