<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bavotasan.com &#187; threaded comments</title>
	<atom:link href="http://bavotasan.com/tag/threaded-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Threaded Comments Going Out of Order in WordPress</title>
		<link>http://bavotasan.com/2009/threaded-comments-going-out-of-order-in-wordpress/</link>
		<comments>http://bavotasan.com/2009/threaded-comments-going-out-of-order-in-wordpress/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 12:09:17 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[Admin Panel]]></category>
		<category><![CDATA[cause]]></category>
		<category><![CDATA[Easy Solution]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[threaded comments]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=432</guid>
		<description><![CDATA[Ever notice that certain comments end up out of order. I&#8217;ve encountered this issue on one of my posts and I think I discovered the cause. The problem is that I have been responding to certain comments through the admin panel and not directly on the single post page. Some of these comments are already [...]]]></description>
			<content:encoded><![CDATA[<p>Ever notice that certain comments end up out of order. I&#8217;ve encountered this issue on one of my posts and I think I discovered the cause. The problem is that I have been responding to certain comments through the admin panel and not directly on the single post page. Some of these comments are already threaded under other comments but there is no way to tell in the admin panel. It was all my fault, though and not WordPress&#8217;.<br />
<span id="more-432"></span><br />
I had to go into the database and just remove the comment_parent value from my comments that were causing the problem and everything went back into place. Not an easy solution but a solution none the less. Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/threaded-comments-going-out-of-order-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Nested Comments to Your WordPress Theme</title>
		<link>http://bavotasan.com/2009/how-to-add-nested-comments-to-your-wordpress-theme/</link>
		<comments>http://bavotasan.com/2009/how-to-add-nested-comments-to-your-wordpress-theme/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 16:53:55 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alignright]]></category>
		<category><![CDATA[Amp]]></category>
		<category><![CDATA[bunch]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[comment]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[custom theme]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[lot]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[New Features]]></category>
		<category><![CDATA[Padding]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[Style]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[threaded comments]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[Url]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[web programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress hack]]></category>
		<category><![CDATA[Wp]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=333</guid>
		<description><![CDATA[When WordPress 2.7 came out, there were a lot of new features, most of which probably passed by under your radar. I know I missed a bunch and thankfully, I am starting to notice how much more powerful WordPress has become. I had someone request making my Magazine Basic theme function with nested comments and [...]]]></description>
			<content:encoded><![CDATA[<p>When WordPress 2.7 came out, there were a lot of new features, most of which probably passed by under your radar. I know I missed a bunch and thankfully, I am starting to notice how much more powerful WordPress has become. I had someone request making my <a href="http://bavotasan.com/wordpress/free-wordpress-themes/magazine-basic-free-wordpress-theme/">Magazine Basic theme</a> function with nested comments and that started me on researching just how this new WP feature worked. It ended up being a harder nut to crack than I first thought, but crack it I did (though I probably spend way too much time on it).<br />
<span id="more-333"></span><br />
There are quite a few steps to making your theme work with nested comments but the easiest thing to do to start off is open up your theme&#8217;s comments.php file and replace it with this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Do not delete these lines</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SCRIPT_FILENAME'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #0000ff;">'comments.php'</span> <span style="color: #339933;">==</span> <span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SCRIPT_FILENAME'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #990000;">die</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Please do not load this page directly. Thanks!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> post_password_required<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;p class=&quot;nocomments&quot;&gt;This post is password protected. Enter the password to view comments.&lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;!-- You can start editing here. --&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;h3 id=&quot;comments&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No Responses'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'One Response'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Responses'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> to &amp;#8220;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;#8221;&lt;/h3&gt;
&nbsp;
&lt;div class=&quot;navigation&quot;&gt;
&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;/div&gt;
&nbsp;
&lt;ol class=&quot;commentlist&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ol&gt;
&nbsp;
&lt;div class=&quot;navigation&quot;&gt;
&lt;div class=&quot;alignleft&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> previous_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;div class=&quot;alignright&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> next_comments_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// this is displayed if there are no comments so far ?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;!-- If comments are open, but there are no comments. --&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// comments are closed ?&gt;</span>
<span style="color: #339933;">&lt;!--</span> <span style="color: #b1b100;">If</span> comments are closed<span style="color: #339933;">.</span> <span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;</span>p <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;nocomments&quot;</span><span style="color: #339933;">&gt;</span>Comments are closed<span style="color: #339933;">.&lt;/</span>p<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'open'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_status</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;div id=&quot;respond&quot;&gt;
&nbsp;
&lt;h3&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_form_title<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Leave a Reply'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Leave a Reply to %s'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h3&gt;
&nbsp;
&lt;div class=&quot;cancel-comment-reply&quot;&gt;
&lt;small&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> cancel_comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;
&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_registration'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$user_ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;p&gt;You must be &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-login.php?redirect_to=<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;logged in&lt;/a&gt; to post a comment.&lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$user_ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;p&gt;Logged in as &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$user_identity</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;. &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Log out of this account&quot;&gt;Log out &amp;raquo;&lt;/a&gt;&lt;/p&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;author&quot; id=&quot;author&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; size=&quot;22&quot; tabindex=&quot;1&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;aria-required='true'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> /&gt;
&lt;label for=&quot;author&quot;&gt;&lt;small&gt;Name <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(required)&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;
&nbsp;
&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author_email</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; size=&quot;22&quot; tabindex=&quot;2&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;aria-required='true'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> /&gt;
&lt;label for=&quot;email&quot;&gt;&lt;small&gt;Mail (will not be published) <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(required)&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;
&nbsp;
&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author_url</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; size=&quot;22&quot; tabindex=&quot;3&quot; /&gt;
&lt;label for=&quot;url&quot;&gt;&lt;small&gt;Website&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;!--&lt;p&gt;&lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; You can use these tags: &lt;code&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> allowed_tags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/code&gt;&lt;/small&gt;&lt;/p&gt;--&gt;
&nbsp;
&lt;p&gt;&lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;100%&quot; rows=&quot;10&quot; tabindex=&quot;4&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
&nbsp;
&lt;p&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Submit Comment&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_id_fields<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/p&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> do_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'comment_form'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;/form&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// If registration required and not logged in ?&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// if you delete this the sky will fall on your head ?&gt;</span></pre></td></tr></table></div>

<p>Now, you need to make sure that nested comments are activated on your WordPress install by going to your admin panel =&gt; Settings =&gt; Discussion and checking &#8220;Enable threaded (nested) comments&#8221; Set the level to whatever you want. I like using 2 levels.</p>
<p>If you return to a post page on your site, you should now see reply buttons after each post. And if you click reply, you will noticed that not much happens other than &#8220;Click here to cancel reply.&#8221; appearing above your reply window. It is a little too subtle for me, so luckily there is a great Javascript hook already installed that you can call by just adding this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_singular<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> wp_enqueue_script<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'comment-reply'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>to you header.php file above <code>&lt;?php wp_head(); ?&gt;</code>.</p>
<p>Now when you click reply, the reply box appears directly below the comment you want to reply to. This is a great little feature and it makes your comments section more intuitive for your user.</p>
<p>The only thing left, really, is styling your comments. With WordPress 2.7, one hook creates the whole comment loop, as opposed to before when you had to call the avatar, the comment text, the date and all that jazz. There is a lot happening with <code>&lt;?php wp_list_comments(); ?&gt;</code> and though some might find it awesome that you don&#8217;t have to worry about adding tons of code, others might not like the fact that you can&#8217;t edit what appears in your comments and where. There is a solution to this that I will show you below, but for now lets talk about CSS.</p>
<p>WP 2.7 nested comments introduce some new classes and ids for you to style as you wish. It is a pretty long list though.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ol<span style="color: #6666ff;">.commentlist</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.alt</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.bypostauthor</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.byuser</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment-author-admin</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.comment-author</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> a.<span style="color: #993333;">url</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> img<span style="color: #6666ff;">.avatar</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> img<span style="color: #6666ff;">.avatar-32</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> img<span style="color: #6666ff;">.photo</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.vcard</span> span<span style="color: #6666ff;">.says</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.commentmetadata</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.comment-meta</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.comment-meta</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> <span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span> - <span style="color: #00AA00;">&#40;</span>p<span style="color: #00AA00;">,</span> em<span style="color: #00AA00;">,</span> strong<span style="color: #00AA00;">,</span> blockquote<span style="color: #00AA00;">,</span> ul<span style="color: #00AA00;">,</span> ol<span style="color: #00AA00;">,</span> etc.<span style="color: #00AA00;">&#41;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.reply</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> div<span style="color: #6666ff;">.reply</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.alt</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.bypostauthor</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.byuser</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.comment</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.comment-author-admin</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-2</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-3</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-4</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-5</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.comment</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.odd</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.even</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.odd</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.parent</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.comment-author</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.vcard</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> a.<span style="color: #993333;">url</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.vcard</span> span<span style="color: #6666ff;">.says</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.commentmetadata</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.comment-meta</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.comment-meta</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> <span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span> - <span style="color: #00AA00;">&#40;</span>p<span style="color: #00AA00;">,</span> em<span style="color: #00AA00;">,</span> strong<span style="color: #00AA00;">,</span> blockquote<span style="color: #00AA00;">,</span> ul<span style="color: #00AA00;">,</span> ol<span style="color: #00AA00;">,</span> etc.<span style="color: #00AA00;">&#41;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.reply</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.reply</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.alt</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.bypostauthor</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.byuser</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.comment</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.comment-author-admin</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-2</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-3</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-4</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-5</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.odd</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.thread-alt</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.thread-even</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.thread-odd</span> <span style="color: #00AA00;">&#123;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The depth actually goes down to level 10 but I stopped at level 5 above. Hopefully you get the idea. There are a lot of elements to style but of course, you don&#8217;t have to style them all. For my <a href="http://bavotasan.com/wordpress/free-wordpress-themes/magazine-basic-free-wordpress-theme/">Magazine Basic theme</a>, I used only the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ol<span style="color: #6666ff;">.commentlist</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#d5d5d5</span><span style="color: #00AA00;">;</span> border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">7px</span> <span style="color: #933;">5px</span> <span style="color: #933;">64px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> comment-author <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">170px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.vcard</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> helvetica<span style="color: #00AA00;">,</span>arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> a.<span style="color: #993333;">url</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#cc0000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.vcard</span> cite<span style="color: #6666ff;">.fn</span> a.<span style="color: #993333;">url</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.vcard</span> img<span style="color: #6666ff;">.avatar</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.comment-meta</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> helvetica<span style="color: #00AA00;">,</span>arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.comment-meta</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#205B87</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li p <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> helvetica<span style="color: #00AA00;">,</span>arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">16px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> helvetica<span style="color: #00AA00;">,</span>arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">square</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.reply</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#999</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#666</span><span style="color: #00AA00;">;</span> border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span> <span style="color: #933;">9px</span>/<span style="color: #cc66cc;">1</span> helvetica<span style="color: #00AA00;">,</span>arial<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">6px</span> <span style="color: #933;">5px</span> <span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">36px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.reply</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#cc0000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#cc0000</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li div<span style="color: #6666ff;">.reply</span> a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul<span style="color: #6666ff;">.children</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-2</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-3</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-4</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.depth-5</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.odd</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> ul<span style="color: #6666ff;">.children</span> li<span style="color: #6666ff;">.even</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#f6f6f6</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
ol<span style="color: #6666ff;">.commentlist</span> li<span style="color: #6666ff;">.pingback</span> div<span style="color: #6666ff;">.vcard</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">170px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>If you have your nested comment level set to 3 you should now have something that looks like this:</p>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/03/threaded.png" alt="threaded" title="threaded" width="580" height="343" class="aligncenter size-full wp-image-357" /></p>
<p>It all works great but there are a few things that I wanted to change. They don&#8217;t make it that easy to manipulate things but I figured it out and added a few touches of my own to get it to perform how I wanted it to.</p>
<p>To change the size of the avatar you can change line 25 in comments.php to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'avatar_size=48'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The default avatar size is 32 and you can change it to anything you want.</p>
<p>If you don&#8217;t want your comments to be displayed as the default unordered list (ul), you can change the style to divs or an ordered list (ol) by using the following;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'style=div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Replace div with ol or ul but be sure to also change line 24 and 26 which currently is set for ordered lists so that you have something like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;commentlist&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'style=div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></td></tr></table></div>

<p>If you want to only display comments, trackbacks, pingbacks (trackbacks and pings) or pings, you can use the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Now for those people who want total control over their code. This is not recommended to those who are inexperienced with coding. This actually bypasses all of the internal WordPress functionality in regards to comments and lets you customize everything that the wp_list_comments hook spits out. This is a two step process.</p>
<p>First add:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_comments<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'callback=mytheme_comment'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Then go to your functions.php file (or create a functions.php file if you don&#8217;t already have one) and add this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> mytheme_comment<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;li <span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_class<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> id=&quot;li-comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;div id=&quot;comment-<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;div class=&quot;comment-author vcard&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">,</span><span style="color: #000088;">$size</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'36'</span><span style="color: #339933;">,</span><span style="color: #000088;">$default</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'&lt;path_to_url&gt;'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt;  &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_approved</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;em&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Your comment is awaiting moderation.'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/em&gt;
&lt;br /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span>get_comment_link<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%1$s at %2$s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>get_comment_time<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_comment_link<span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(Edit)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'  '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/div&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_text<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'max_depth'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">!=</span><span style="color: #000088;">$depth</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;div class=&quot;reply&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> comment_reply_link<span style="color: #009900;">&#40;</span><span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$depth</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'max_depth'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'max_depth'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Here there is a lot that you can do. You can set your avatar size, change your classes and ids, change you awaiting moderation text or pretty much just rearrange the entire layout. I even added a little if statement at the end to only display the reply button if your comments can go down another level (this took a long time to figure out but is totally worth it in my books).</p>
<p>With everything above in place, your WordPress theme should now be fit to work with nested comments and you should be able to control how they are displayed to your hearts content.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/how-to-add-nested-comments-to-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>120</slash:comments>
		</item>
	</channel>
</rss>

