WordPress.org

Forums

Achievements for WordPress
[resolved] Adding comments to achievements (8 posts)

  1. pmcvicker
    Member
    Posted 1 year ago #

    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?

    http://wordpress.org/extend/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    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: https://github.com/paulgibbs/achievements/blob/master/achievements.php#L464
    * In the appropriate template -- content-single-achievement.php I think -- add a call to this function: http://codex.wordpress.org/Function_Reference/comments_template

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

  3. pmcvicker
    Member
    Posted 1 year ago #

    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/challengebeta.mypcls.org/html/wp-content/themes/bounce/comments.php:37) in /nfs/c07/h03/mnt/112287/domains/challengebeta.mypcls.org/html/wp-content/themes/bounce/comments.php on line 109

  4. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

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

  5. pmcvicker
    Member
    Posted 1 year ago #

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

  6. pmcvicker
    Member
    Posted 1 year ago #

    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 http://challengebeta.mypcls.org/achievements/a-tale-for-every-tail/). 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.

  7. pmcvicker
    Member
    Posted 1 year ago #

    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.

  8. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.