Hey Guys,
I was just wondering if anyone knew how to return the number of comments for use in an if statement - something like:
if(comments_number() != '0') {
Is that possible?
Any help greatly appreciated,
Many Thanks,
Oliver
Hey Guys,
I was just wondering if anyone knew how to return the number of comments for use in an if statement - something like:
if(comments_number() != '0') {
Is that possible?
Any help greatly appreciated,
Many Thanks,
Oliver
If it isn't possible using template tags alone, you could certainly use this:
http://txfx.net/code/wordpress/ping-track-comment-count/
Thanks.. but that says that it echoes the counts
There are two functions you can use: get_comment_type_count() (which returns the value) and comment_type_count() (which echoes the value).
Shouldn't that first function work?
Cheers!
This topic has been closed to new replies.