Comment count under each post
-
Hi;
I’d like to have a comment count showing under each individual post. How would I do that?
-
You add a call to the function comments_number to your template.
Thank you, I will try to figure that out.
tried it. but there was no change. Take a look at my coding please. I did this in the comments.php file. Perhaps I put it in the wrong spot.
Here’s my coding http://wordpress.pastebin.com/K32UgdBs
Perhaps I’m not explaining myself correctly. I would like the count to show somewhere next to the “LEAVE A COMMENT” link. You should be able to see the comment count w/out having to click into the post.
Thanks
It needs to go in the template that is used to display the posts – probably index.php, depending on your theme.
then i would add it within this section? is that correct?
OK it worked pretty well,not perfectly, OK, i wanted to attach a screen shot but couldn’t figure out how to do it.
” Link To Full Post Tweet Article Tweet Article Leave A Comment”
Then I have a dividing line & then this line underneath it.“This post currently has one response.”
I would like to get just a #1 or 1 – response somewhere next to the words “LEAVE A COMMENT”
Thanks for your help
Really hard to tell without seeing more of the code, but I would try it like this:
A Comment"); ?></a></p> <p>This post currently has <?php comments_number('no responses','one response','% responses'); ?>.</p>BTW, what did you get when you put the code in comments.php? Did you see the ‘This post currently has’ text?
OK I will try what you said now. And yes I am getting TEXT totally spelling it out “THIS POST HAS ONE RESPONSE” First off, I would like to change the word response to comment, can I do that ?
Thanksoops that didn’t work well at all. Now I’m getting coding that people can see. Here’s my site can you possibly take a look. http://orgelphotography.com/index2.php/
Thanks loads
Change the word ‘response’ to ‘comment’ in the call to comments_number:
<?php comments_number('no comments','one comment','% comments'); ?>still getting that coding showing though
A Comment”); ?></p> I removed that line from my coding, but i’m not liking the spot it’s hitting. how can i change that?
A Comment”); ?></p>
That code was already in the file!! I included it there to show you to insert the new code AFTER that. However, you apparently wanted it before the ‘Leave A Comment’, not after.
You can add some space in front of the text with non-breaking spaces, like this:
<p> This post currently hasThank you. you were a major help.
I actually wanted to really customize my comments so that you can see it as a neat little dropdown underneath. with a hide and unhide button. Somebody else on here actually gave me the coding to get it to show but I didn’t care for the way it looked. Think you’d be able to walk me through something like that?Thanks
The topic ‘Comment count under each post’ is closed to new replies.