Support » Plugin: Achievements for WordPress » Adding comments to achievements

  • Resolved pmcvicker


    I’m interested in adding comment capabilities to each achievement page, to generate discussion around specific achievements. I know that when the custom post type is registered that “comments” needs to be added to the $supports, and that on the admin side comments need to be enabled for the achievement itself, but what do I need to do to have the standard comments template appear on the page itself on the front-end?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Paul Gibbs


    Bah. I don’t know why Achievements don’t support comments already. :/

    Of v3.3 (which is going to come out in the morning; I’ve just tagged it on Github):
    * You’ll need to add “comments” to this array:
    * In the appropriate template — content-single-achievement.php I think — add a call to this function:

    Let me know how it works out. I should add this to 3.4.

    Tried both of those suggestions prior to posting. Inserting <?php comments_template(); ?> in content-single-achievement.php generates the following error:

    Fatal error: Cannot redeclare comment_template() (previously declared in /nfs/c07/h03/mnt/112287/domains/ in /nfs/c07/h03/mnt/112287/domains/ on line 109

    Plugin Author Paul Gibbs


    No idea why you should get that particular error. Will try to look at it tomorrow.

    Would a look at the comments template in my theme be helpful?

    Even more interesting, if I add a comment manually to an achievement page via admin, it does appear on the page, but indicates that comments are closed on the post (see Why would they be closed? They’re enabled both sitewide and on this achievement specifically. I tried creating a new achievement and a test comment from admin produced the same message.

    Alright, I’ve done some more investigating and determined the following:

    • Its not a theme issue. Comments are closed BP-Default as well.
    • Its not a plugin conflict. I disabled every plugin I’ve got running and comments still either don’t appear or are closed when a comment is manually added from admin.
    • We’re looking to shift challenge reports for our site away from forum responses and into comments at the achievement page itself, so getting the comments working would be a huge plus for me.

    Plugin Author Paul Gibbs


    Haven’t had time to look yet. I’m in San Francisco for the next 10 days or so, then more travel at the start of June. I’ll try to carve out some time in between to investigate 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding comments to achievements’ is closed to new replies.