You may be familiar with the process of adding attachments to the comments in Facebook or other social media. And now, you are probably thinking about allowing attachments in WordPress comments instead of limiting the comments to texts only.
If this is the case, this article is to help you learn how to allow attachments in WordPress comments.
Why Allow Attachments in WordPress Comments
Some of our readers are confused about why allow attachments in WordPress comments. In order to get rid of the confusion, we will explain the reasons in detail.
Maybe your visitors are tired to see WordPress comments with texts only. But allowing them to add comments attachments can spare them from the boring texts, resulting in a more interesting and lively comments section with you uploading files like documents and images in WordPress. In a word, texts and attachments can work together to better express the commenters’ idea.
However, it does not mean that your comments section is fully open to any files. We strongly recommend that you should set limitation for the size and the type of files in case of increasing burden for your WordPress server and being taken advantage of by intruders uploading dangerous files to your website.
How to Allow Attachments in WordPress Comments
Step 1: Installation of a Plugin
Having learned the reason for comments attachments, we will further focus on how to allow attachments in WordPress comments step by step. It is necessary for you to install and activate the plugin: Comment Attachment. Before the installation, you should go to your admin area and select Plugins > Add New from the menu to search for “Comment Attachment”.
Step 2: Configuration of Comment Attachment Section
Upon activation, you need to go to Settings > Discussion page to configure this plugin. Scrolling down to Comment Attachment section, you can perform the following operations.
- Display attachment field – Decide the upload field is either before or after the default comment fields.
- Attachment field title – Change the default label of the upload field from “Upload Attachment” to a custom one.
- Maximum file size (in megabytes) – As we mentioned before, you’d better restrict the file size of the uploaded attachment.
- Is attachment required? – This demands that your visitors use attachments in a required manner in order to make a comment successfully
- Attach attachment with current post? – It is easier for you to find which attachments are added in a certain WordPress post.
- Position of attachment in comment text – Decide whether to put the attachment in the position before the main comment, or after it.
- Show image thumbnail – Decide whether to show the image thumbnails in your comments.
- Image attachment size in comment – Choose the image size that is used in your comments. The choice should fit your overall website design and contribute to the user experience.
- Try to embed audio/video player – Assuming that you allow audio and video files as attachments, you need to select this one so that the plugin can take advantage of the WordPress native shortcodes to attach media files. Pay attention that the supported audio file types are covered with .mp3, .m4a, .ogg, .wav, .wma while video types can be .mp4, .m4v, .webm, .ogv, .wmv, and .flv.
Step 3: Settings of File Types
Then what you need to do is to put restrictions on file types, which can be customized in the following section by leaving image and document types checked or unchecked.
Though there are various document types for your options, you need to pay attention to your choice because we have mentioned audio/video player cannot work beyond its supported files. Besides, if you just allow your visitors to upload images, you’d better set the maximum size under 2MB.
Once you have finished your configuration, do not forget to click on the “Save Changes” button so that your visitors can add attachments to your WordPress comments with the help of the comment attachment plugin.
Test the Plugin
Now that you have configured all the settings, you must be curious about how this plugin works. You can check the effect by visiting your website and then making a comment with uploaded files.When you log onto your WordPress admin, you can see the attachment you just uploaded in the comment from the menu.
If you are not satisfied with the attachment, you can delete it only while keeping the comment at the same time. Since all attachments are stored in your Media Library, you can also delete the attached files in it. Besides, you directly delete the attachment once you remove the comment.
We sincerely hope that this article can do you a favor in learning how to allow attachments in WordPress comments. To be honest, it is easy for you to complete the task, but you still need to be much careful about the file size and file types you really allow.
Besides attachments, there are in fact some other ways for making your comments more interesting. For example, you can allow people to like or dislike them. If you want a tutorial about this, read this post.