get_comments_number help
-
I’d like to add another column to the page here called “Comments” (next to “Title, Rating”, “Views” and “Notes”) and then next to each song, it will say “0” or “1” or however many comments are on that tab page/wordpress post.
I found a wordpress function called “get_comments_number” that I think will do this, but I can’t get it to work.
Here is the code I tried, but it didn’t work:
<?php $commentscount = get_comments_number(278); echo $commentscount; ?>
With “278” being an example of one of the posts’ ID…
Is that not the right code to use? Can anyone point me in the right direction?
[closed as duplicate – continue with the original topic http://wordpress.org/support/topic/display-comment-count-next-to-posts?replies=2 ]
The topic ‘get_comments_number help’ is closed to new replies.