Show Comments on the Front Page (main page / index.php) of Wordpress
Ever want to show your post comments on the front page of your Wordpress Blog? You know, the actual main page of you Blog, not some deep url nobody will ever remember?
Well, with this simple modification to your index.php file found in your current theme directory - you can.
Now mind you, if you have a lot of comments, this isn’t for you. Why? Because in that case your front page may run down a mile or two of page view with 50 comments. Presently for me, that’s not an issue.
Personally I like seeing everything displayed on the front page. I really don’t like landing on a home page, viewing a post, then clicking the “comments” to view the post and comments on a separate (single) page. I’d rather scroll through the posts and their comments all at one time. Sometimes the comments are better content then the actual post! Besides, by having comments and the ”leave a comment” box right in front of a visitor, I would think folks may be more likely to leave you their comment too.
I couldn’t find a plug in anywhere to do what I wanted, but do not fear, these two little snippets of code are easy to install and get the job done nicely and swiftly.
Here ya’ go:
Find your index.php file inside your current theme directory. This is the file we’re going to edit. Once you open the index.php file, copy the entire contents to a notepad .txt file for backup before we alter the actual index.php file.
So far? Now in the index.php file….
Find this code:
<?php get_header(); ?>
Below it add this code:
<?php $withcomments = 1 ?>
It should look like this now:
<?php get_header(); ?>
<?php $withcomments = 1 ?>
So Far? Almost done….
Find this code:
<?php endwhile; ?>
Above it add this code:
<?php comments_template(); ?>
It should look like this now:
<?php comments_template(); ?>
<?php endwhile; ?>
Save the file, you’re done.
Told you it was easy. If you run into some problems because you have some kind of super custom altered theme, or it’s not what you thought you wanted - you have the contents of that notepad file you created before you began. Copy and paste those contents back to your index.php file and you’re right back where you started.
Hopefully this helped you, I know it’s exactly what I want for now on this Blog. Maybe since you’re reading this, you’ll leave me a comment? It’s right there below.
Don’t forget to check out:
The “BOMB” for WordPress!
L2 Lumpy
Recent Entries
- FREE Content Rich Websites. You Heard Right - Whypark
- GoDaddy “Quick Content” Domain Parking Program - Junk
- Bidvertiser. Be Careful
- Domain Parking Companies. Who’s the Best? Part II
- Domain Parking Companies. Who’s the Best? Part I
- $50 a Month Boost Unlimited Calls, Text, Internet, etc.
- Show Comments on the Front Page (main page / index.php) of Wordpress
- Meta Tags and SEO
- Graves Disease Part II
- Graves Disease Part I







I would like to only show 3 of the latest comments for each post with a more button for all of them.
Is there an easy way to do that?
I don’t have the fix for that off the top of my head, but I’ll look into it a little later this week….
I’m sure there’s a way to do it, just have to spend some time at the coding.
L2 Lumpy
Hello, I can’t understand how to add your blog in my rss reader.
Have you tried adding http://feeds.feedburner.com/WheresLumpy or XML version http://www.whereslumpy.com/feed/
Did that help?
L2 Lumpy
Thanks for this!
You’re welcome. Thanks for dropping a comment.
L2 Lumpy
Today I learned something new. Thanks.