Forums

Changing the wording for Facebook comments when there is only one comment (1 post)

  1. laurenmichell
    Member
    Posted 7 months ago #

    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?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 7 months ago by laurenmichell
  • This topic is not resolved
  • WordPress version: 3.2.1