Ability to comment on tags that represent a certain “issue”

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.

Read More

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

Related posts

Leave a Reply

2 comments

  1. 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.

  2. 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.

    update

    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:

    <?php
    //save the true post id
    $true_id = $post->ID;
    // populate $post with the stub post
    query_posts('p=STUB_POST_ID');
    the_post();
    //fool wordpress
    $wp_query->is_single = true;
    //get comments
    comments_template();
    //reset wordpress to ture post
    $wp_query->is_single = false;
    query_posts("p=$true_id");
    the_post();
    ?>
    

    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 🙂