Is there a way to allow attachments with wordpress comments?

I know of a paid plugin that allows this but I was hoping for someone to point me in the correct direction that's future proof and doesn't rely on plugins. Ideally I would want the attachment to be connected to the post itself so we could query all the attachments if needed.


  • 3
    "that's future proof and doesn't rely on plugins" Good plugins are future proof. Jan 12, 2013 at 18:14
  • 4
    "Without a plugin"? Why would you want that? This is functionality that doesn't belong in a theme, but in a plugin. Think about what happens if you change your theme: All this functionality would be gone. Also: Why not pay if there's a plugin that perfectly solves this? In it's current state this question has my close vote, as it's either a plugin recommendation, which is off-topic per our faq or it is a "do this job for me"-question, which is also off-topic. And it also misses any shown effort to get around the problem. Then there's also missing information about the who & hows.
    – kaiser
    Jan 12, 2013 at 18:16
  • Already bought the plugin, but this is not a very popular functionality and these sort of plugin are not on priority of the developers so they slowly stop working.
    – farhan
    Jan 14, 2013 at 23:54

2 Answers 2


Here is my suggestion:

Just download this Comment Images plugin.

As of now it only support images. But upload work with all file types.

So just make a little tweak like this. So it will display attachment link.

Replace line 245 from

$comment->comment_content .= '<img src="' . $comment_image['url'] . '" alt="" />';


$comment->comment_content .= '<a href="'. $comment_image['url'] .'">Download attachment</a>';

But you mentioned, you want that function in theme instead of plugin. So if you really know what you are doing, just integrate that whole plugin code in your theme by changing file path.

Otherwise, just hire a programmer.

  • This was something like what I was Looking for!! Many thanks.
    – farhan
    Jan 14, 2013 at 23:52

There is atually, it's more than simple, you just need to install this plugin:


Then in Settings > Disscussion, you will have new options, where you set whatever you wish to happend and you're good to go.

Plugin settings in admin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.