Just a little gripe I have with some of the WordPress themes created by some of those amazing designers out there. Some theme designers forget to provide the option to have the comment dialogue box auto expand at the end of articles. Not a problem when there’s a button stating “add comment here” but it is a problem when there isn’t such a button or when busy visitors are too much in a rush to look for such a button. Think about it, do you look for a comment box or do you look for a “add comment” button?
After a little bit of searching I found the code edits needed to make the comment box always visible for WordPress articles; and I must say thank you to Sheila Hoff for posting the solution in the WordPress support forum (I’ve linked to your homepage in gratitude).
Here’s what you need to do to automatically expand WordPress comments:
- Go to your Dashboard, find where it says “Appearance” in the sidebar on the left-hand-side then select “Editor”
- On the right-hand-side of the newly opened page, you will see a list of files; select the one that says “Main Index Template” or “index.php”
- In the editor window you will see text that starts with
<?php
followed by more text. Look for a line that says
<?php get_header(); ?>
and add
<?php $withcomments = 1 ?>
onto a new line below it
- Now check through the page for any line of text that might say
<?php comments_template(); ?>
If it isn’t present then find
<?php endwhile; else: ?>
and above it, on a line of its own, add
<?php comments_template(); ?>
So the top might then look like:
<?php get_header(); ?> <?php $withcomments = 1 ?>
And somewhere toward the bottom it will then look like
<?php comments_template(); ?> <?php endwhile; else: ?>
You will find it easier to search “index.php” if you copy it into a text editor, press ctrl+f then type your search terms.
Copyright secured by Digiprove © 2010
Related posts:

![Wordpress: How to Auto Expand Comments by Default Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_a.png?x-id=806796de-4749-4b74-91ee-d86c4af69394)















Nice brief and this enter helped me alot in my college assignement. Gratefulness you for your information.
I’m looking for how to autoexpend my comments. Now, your blog really help what I want. Thanks. Great content.
Glad I helped :)
Thanks for posting
Should this work with wordpress 3.0?
Thank you
I haven’t tried it with WP 3. Let us know when you have, thanks
It doesn’t work with 3.0. Do you have any suggestions?
I don’t at the moment. I’ll have a think and let you know if I come up with any.