Return to Snippet

Revision: 34903
at October 30, 2010 02:05 by howardpanton


Initial Code
<h1><?php
$commentscount = get_comments_number();
if($commentscount == 1): $commenttext = 'comment'; endif;
if($commentscount > 1 || $commentscount == 0): $commenttext = 'comments'; endif;
echo get_the_title().' ('.$commentscount.' '.$commenttext.')';
?></h1>

Initial URL


Initial Description
Count commetns and return value into the post

Initial Title
Wordpress Comment count

Initial Tags
wordpress

Initial Language
PHP