WordPress.org

Support

Support » Plugins and Hacks » Hacks » Changing the wording for Facebook comments when there is only one comment

Changing the wording for Facebook comments when there is only one comment

  • I’m using Facebook comments and using this code to generate a comment count:
    <a href="<?php the_permalink() ?>#comments" class="commentCount"><?php fb_comment_count() ?> comments</a>

    However, if I only have one comment on a post, it displays as “1 comments” instead of “1 comment.”

    What’s the best way to interact with the Facebook API to say something like: If comment count = 1, echo fb_comment_count comment. Else, echo comments?

  • The topic ‘Changing the wording for Facebook comments when there is only one comment’ is closed to new replies.