I was chatting with a non-techy friend who doesn't even use wordpress...she told me in some blogs, specially activism ones, there are some issues being repeatedly discussed, sometimes she likes to comment on the "issue" not on the post.

"issues" are represented by tags usually or categories.

so i was wondering, is there a way to comment on "tags" or have discussion via nested comments ?

and what do u think of the concept as a whole, not only the technicalities.

Thanks for feedback

  • By default this is not possible in WordPress, because comments reference a (custom) post, and a taxonomy (category, tag, ...) is not a post. There are ways around this, by creating a stub post for each category. A related question asks about this feature for author pages. For your friend it might be a solution to mail her comments to the site, maybe they'll post it as a guest item and the discussion can start from there :-)
    – Jan Fabry
    Jan 24, 2011 at 13:10
  • Thanks for your feedback... do you think there is a way to link the tag to that stub post ? maybe by using the name ? Jan 24, 2011 at 14:10
  • I have done a similar thing (a post that is displayed at the top of a tag archive) be linking them on the slug name. So the custom taxonomy archive at /people/seth-godin/ displays a custom post with the slug seth-godin at the top, if that post exists. (Use @Jan in your reply so I get a notification)
    – Jan Fabry
    Jan 24, 2011 at 16:25

2 Answers 2


As Jan Fabry points out this is not possible by default as WordPress stores comments against post and post-like content and not the tags or organization of that content.

That said, the template is so flexible that you could simple use the tag.php template to mimic this -- using something like Disqus, JS-Kit/Echo or the Facebook commenting plugin.

In my experience, external commenting software tends to use a variation on permalinks to uniquely identify conversations and WordPress tag templates fit the bill quite nicely.


I've read about this that you would have to fool WordPress into thinking that you are on a single post to get the comments template and have found a way to do that.


as Jan Fabry pointed out you need to mind the $POST->ID, so you will need to create a stub post for each category or tag , just for the ID so that post will hold all comments. the code was updated. in your themes archive.php or category.php just after the loop paste this code:

//save the true post id
$true_id = $post->ID;
// populate $post with the stub post
//fool wordpress
$wp_query->is_single = true;
//get comments
//reset wordpress to ture post
$wp_query->is_single = false;

you will need to change the STUB_POST_ID with the stub post id!

and you can use a conditional tag to change to the right stub id like this:

if (is_category('foo')){
     $post->ID = 25;
}elseif (is_category('bar')){
     $post->ID = 30;

weird but it works :)

  • בניית אתרים: What is the value of comment_post_ID for these comments? Just one of the posts on the archive page? Because then they would also be displayed when you visit that single post. (I hope I did not mess anything up in your name by copying the RTL text in this comment!)
    – Jan Fabry
    Jan 24, 2011 at 16:21
  • @ Jan Fabry - LOL you got the name right and you are right about the post id so i updated the answer.
    – Bainternet
    Jan 24, 2011 at 16:31

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.