0

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

0

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.';
else
    echo 'Please write a comment';
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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