Many WordPress themes display the number of comments. The number of comments is a way to show which posts are popular and which are not. The number of comments show a social proof. For a new blogger, or a blog which doesn't receive many comments, this can be a challenge.
Unfortunately many of the themes are too blunt when there are no comments. For new bloggers and blogs, it's not uncommon to see "No comments" or "0 comments" on a blog post. Wouldnt' it be better if it would say "Leave a comment" or "Start the discussion" instead? This post will show you how to do it...
Introduction
One of the 15 tips to get more blog comments I wrote about was show number of comments, and a part of that tip was: add a call to action to the comment links, instead of showing "0 comments" or "no comments".
In the comments, Benjamin (of Peaceful Prosperity) asked:
I've heard several people recommend the "start the discussion" idea as opposed to "0 comments" (which does look a little sad)... but I haven't found an explanation of how to do this. Do you have any ideas about the 'how to'... or can you point me in the right direction?
And Steve (at JEDsWEB) sent me the same question via email:
I would like to know to change the number of comments to a call to action (for me it would be a WordPress hosted blog)
The previous post, covered how to show number of comments in WordPress to detail, in this post, I'll show how to add the call the action (it's not hard, but it does require digging into the php-files of the WordPress theme).
In short, it's matter of finding where the comment numbers are displayed in the theme, and edit the "No comments" or "0 comments" in to something else. The details and examples follow...
Warning: PHP code ahead
Since this WP hack takes you into WordPress theme files and you need to edit php-code, proceed with caution, but don't be too afraid. I try to keep it simple, so anyone can do this.
If you edit the .php code of your theme, make sure to backup of all your theme files before doing any changes. If anything goes wrong, revert back to the original files.
When you edit the WordPress theme-files, or any other code, I recommend you edit them via FTP and use good text editor with code-highlighting instead of "Appearance >> Editor" in the WordPress dashboard.
How to Add a Call to Action to the Comment Link
Tweaking what your theme shows when there are no comments is not the most important thing in blogging, but it's a cool little modification that can help increase the chances of getting more blog comments.
As mentioned in the beginning, a reader is much more likely to leave a comment if the comment link says "Leave a comment!" or "Start the discussion!" than blunt "0 comments". So no "zero comments", but something else instead... let's see how to modify your theme and make it little bit better...
By default comments_popup_link displays
- No Comments
- 1 Comment
- % Comments
If you theme displays "No Comments" or "0 comments" when there are no comments on a post, you should change that into a call to action, like "Be the first to leave a comment!".
- open your theme php-files for editing, e.g. index.php
- look for comments_popup_link and/or comments_number, e.g.
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
- If you can't find anything like that, look for anything related to comments with text that your theme currently displays
- edit the values in it
- Edit the "No comments" or "0 comments" to something else
Here are some examples:
<?php comments_popup_link( 'Leave a comment', '1 comment', '% comments so far', 'comments-link', 'Comments are off for this post'); ?>
<?php comments_popup_link('Be the first to comment!', '1 comment.', '% comments already!'); ?>
Make sure there is enough space on your theme to display whatever text you use. If your theme displays the number of comments on a place (or you set it that way), you can use longer phrases, like
<?php comments_popup_link('Start the discussion!', 'One lonely comment. Add yours to make it two!', '% comments already! Join the discussion!'); ?>
Or if you want to add the post title for example, you can go for something like
<?php comments_popup_link(__('Be the first to comment on ' . the_title('','',false)),__('One comment on ' . the_title('','',false)), __('% comments on '. the_title('','',false))); ?>
Personally I use something like (I suggest you make your match your style and blog):
- Be the first to comment on this post
- One comment, go ahead and add another
- % comments already! Join the discussion
<?php comments_popup_link('Be the first to comment on this post!', 'One comment, go ahead and add another', '% comments already! Join the discussion'); ?>
Summary
It is better to not display "No comments" or "0 comments", but "Leave a comment" or other call to action instead. In your WordPress theme-files, look where the number of comments and comment links are placed and edit the descriptions to match your and your blog's style.
If you're uncomfortable doing technical tasks like this, you can always ask for help from someone, look for another theme or just leave it be and concentrate on more important things about blogging, like creating great content.
Remember to backup your (theme) files before editing anything so you can go back to the unchanged files. And if you're using a premium WordPress theme, you should contact the support of that theme before doing any changes, since they might have a solution or option in place so you don't have to hack (and possibly break) the precious premium theme.
Tell me how can I make this post and blog better to help you even more! If you have any comments or questions about this post or other WordPress hacks, theme related or not, feel free to ask your questions in the comments or send me an email using the contact form.
Here's more cool posts similar to this one:
18 comments.
I confess to be scared as hell about playing with the raw code behind my theme but I use Thesis OpenHook so there might be a way around this for us couch potato types. Thanks for jogging my memory about this, I will look into this.
Thanks this was a wonderful tip! Now my older posts may get some love :)
I had to do a little digging as you suggested, but I've done it and it looks great.
Thanks for sharing!
Thanks this was a wonderful tip! Now my older posts may get some love :)
I had to do a little digging as you suggested, but I've done it and it looks great.
Thanks for sharing!
This is an interesting post on how we can encourage more comments by using the right statement. My friends have told me that sometimes, before reading a post, they first try to see how many comments it has, and if it has none, they tend to look for other things to read. I think the steps above will help a lot in this scenario.
With any premium theme it's the responsibility of the support for that theme to help you. If they don't, make a blog post how much their support sucks :)
Excellent, I'm glad this helped! and that I managed to explain it well enough :)
replace Symbian in the future as Nokia goes beyond Smartphones? February 22, 2010 Jay Montano Leave a comment Go to comments …
Ping me sometime, I'll give you a hand with it because I use Thesis too.
Not sure if it's in the hook system.
If not, we'll either add our own hook, or just change the source internally. Won't be hard, I can step you through it. Sometime early next week would work (March 8+).
If I get around to doing this, I'll write it up for Thesis theme. I want to, bunch of other stuff I need to do first.
Antti, thanks for a post … first thought I'm not a techie I am not going to do this, then switched to this sounds easy!, only to find I'm running Thesis and things are different, and finally went with your wise “or just leave it be and concentrate on more important things” recommendation such as making sure over time the zero comment thing goes away naturally.
Dave
Many thanks for the offer, message sent via your contact page.
cool. I actually had that before until I switched to another template. you're right, its actually the support squad's responsibility to help bloggers when it comes to that thing.
cool. I actually had that before until I switched to another template. you're right, its actually the support squad's responsibility to help bloggers when it comes to that thing.
Air force 1 shoes was Nike air force born in 1982, being deeply rooted in basketball. Was selected six basketball players to endorse this shoe: Moses Malone (Moses Malone),(Michael Cooper), Nike elected in 1982, the “original six” professional basketball player as a air force 1 shoes spokesman forNike air force. they are from Zhang Jingdian off the track on the poster, successfully flew over the basketball and culture, basketball has been not the old definition of basketball.
Hi Zemalf
Great stuff. I searched around, found numerous bits of advice but couldn't get it to work. Your straightforward way did it straight-up. Thanks.
Harry, I'm happy my post was helpful. And thanks for taking the time comment, I appreciate it!
I completely agree. It is much more encouraging when you see words Start a discussion than 0 comments. To make the blog more attractive one should pay attention not only to its content but also to the opportunities for the visitors to express their opinions.
I confess to be scared as hell about playing with the raw code behind my theme but I use Thesis OpenHook so there might be a way around this for us couch potato types. Thanks for jogging my memory about this, I will look into this.