WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

this isn't major but would be nice. Would like to have 2 titles for the comment form, one that says "no comments yet start the discussion" and another that says "join the discussion". I've had a good look around but I can't see anything already posted about doing this. Can anyone assist? Skip.

(I may use different phrases but you get the general idea I'm sure).

share|improve this question
up vote 0 down vote accepted

Use get_comments_number() to get … well … the number of comments. In your theme’s comments.php you can use its return value to do something:

$num = (int) get_comments_number();

if ( 0 === $num )
    echo 'Be the first! But please don’t write just “First!”';
elseif ( 100 < $num )
    echo 'Yeah, add some noise. Nobody will read it.';
    echo 'Please write a comment';
share|improve this answer
Thank you that makes perfect sense to me. Will accept the answer and Toscho I recall you've helped me a few times so thank you very much. – Paul Brown Nov 6 '13 at 11:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.