<?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; someone</title>
	<atom:link href="http://bavotasan.com/tag/someone/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>WordPress 3.0: Activating the Background Editor</title>
		<link>http://bavotasan.com/2010/wordpress-3-activating-background-editor/</link>
		<comments>http://bavotasan.com/2010/wordpress-3-activating-background-editor/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 21:31:39 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[admin user]]></category>
		<category><![CDATA[Background]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Placing]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[Wp]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=2193</guid>
		<description><![CDATA[Adding a color or image to your Web site&#8217;s background is not a very complicated thing to do if you are familiar with CSS. Luckily for those out there who know nothing about CSS, WordPress 3.0 introduces a simple admin user-interface that makes it extremely simple to select a color or image for your background. [...]]]></description>
			<content:encoded><![CDATA[<p>Adding a color or image to your Web site&#8217;s background is not a very complicated thing to do if you are familiar with CSS. Luckily for those out there who know nothing about CSS, WordPress 3.0 introduces a simple admin user-interface that makes it extremely simple to select a color or image for your background. There are even controls for image position, repeating and attachment.<br />
<span id="more-2193"></span><br />
<div id="attachment_2194" class="wp-caption aligncenter" style="width: 570px"><img src="http://bavotasan.com/wp-content/uploads/2010/06/background.jpg" alt="" title="Background Editor" width="560" height="420" class="size-full wp-image-2194" /><p class="wp-caption-text">The new background editor in WordPress 3.0</p></div></p>
<p>Activating the background editor only requires that you add one line of code to your theme&#8217;s <code>functions.php</code> file.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'add_custom_background'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> add_custom_background<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>This will add the &#8220;Background&#8221; link to your Appearance panel in the wp-admin. Placing it inside the <code>function_exists()</code> function makes it backwards compatible in case someone uses your theme with WordPress 2.9.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/wordpress-3-activating-background-editor/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Making Cookies with PHP</title>
		<link>http://bavotasan.com/2010/making-cookies-with-php/</link>
		<comments>http://bavotasan.com/2010/making-cookies-with-php/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 17:25:01 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[expiration]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[something]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[top]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1661</guid>
		<description><![CDATA[I&#8217;ve been going nuts over the past month trying to complete a project for a large retail store and it seems like every new request they make requires me to learn something new about PHP. Coding challenges are always great because they lead you to discover new ways to take advantage of what your coding [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been going nuts over the past month trying to complete a project for a large retail store and it seems like every new request they make requires me to learn something new about PHP. Coding challenges are always great because they lead you to discover new ways to take advantage of what your coding language has to offer. This one is pretty straightforward but great to know.<br />
<span id="more-1661"></span><br />
First we need to set the cookie:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// basic setting</span>
  <span style="color: #666666; font-style: italic;">// setcookie(name, value, expire, path, domain); </span>
  <span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">24</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// expires in one month</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'visited'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'yes'</span><span style="color: #339933;">,</span><span style="color: #000088;">$expire</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>The above cookie records that someone has already visited the site. It will expire in one month and the path and domain are set automatically if left blank. If you do not include an expiration time, the cookie will only be stored for the current session.</p>
<p><strong>NOTE:</strong> Cookies must always be set before anything else, so be sure to place it above the &lt;html&gt; tag at the top of your file.</p>
<p>Here is how you would retrieve a cookie:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// display one cookie with the name &quot;visited&quot;</span>
  <span style="color: #000088;">$the_cookie</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'visited'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// see all cookies</span>
  <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p>To delete a cookie we need to take advantage of the <em>expire</em> variable:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #666666; font-style: italic;">// set the cookie to expire one hour in the past</span>
  <span style="color: #000088;">$expire</span> <span style="color: #339933;">=</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'visited'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$expire</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

<p><strong>Resource:</strong> <a href="http://php.net/manual/en/function.setcookie.php">PHP: setcookie &#8211; Manual</a></p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/making-cookies-with-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Magazine Premium is Ready and I Want to Give Away 5 Copies</title>
		<link>http://bavotasan.com/2010/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/</link>
		<comments>http://bavotasan.com/2010/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 18:08:08 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css editor]]></category>
		<category><![CDATA[custom css]]></category>
		<category><![CDATA[discussion]]></category>
		<category><![CDATA[face kits]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[mailing]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[panel]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[Slideshow]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=1634</guid>
		<description><![CDATA[I&#8217;m almost finished Magazine Premium and I thought it would be a good idea to open up a discussion to see what features people would like to see available. Now don&#8217;t go crazy, and please don&#8217;t repeat the same requests. I&#8217;ll take the top 5 best requests (that aren&#8217;t a part of the theme already) [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1636" title="magprem_themesby" src="http://bavotasan.com/wp-content/uploads/2010/01/magprem_themesby.jpg" alt="" width="300" height="225" />I&#8217;m almost finished Magazine Premium and I thought it would be a good idea to open up a discussion to see what features people would like to see available. Now don&#8217;t go crazy, and please don&#8217;t repeat the same requests. I&#8217;ll take the top 5 best requests (that aren&#8217;t a part of the theme already) and I&#8217;ll add them to Magazine Premium. I&#8217;ll also give a free copy to those who suggested the top 5.<br />
<span id="more-1634"></span><br />
Add your suggestions in the comments below. If someone already suggested a feature you wanted, don&#8217;t fret, just think of something else you might want to see in Magazine Premium.</p>
<p>Here is a quick list of features that I have already added:</p>
<ul>
<li>widgetized footer bar</li>
<li>custom footer text</li>
<li>optional &#8220;Powered by WordPress&#8221; link</li>
<li>checkboxes for cats and pages to include in nav menu</li>
<li>optional secondary nav menu</li>
<li>optional search bar or home link in main nav menu</li>
<li>4 front page section with selectable category feed</li>
<li>variable site and sidebar width</li>
<li>featured slideshow with selectable category feed</li>
<li>optional images for each front page section</li>
<li>font selection</li>
<li>color selection</li>
<li>sidebar ads widget</li>
<li>sidebar tabs widget (recent comments, popular posts and subscribe)</li>
<li>simple mailing list/subscribe to our mailing list function</li>
<li>custom CSS editor</li>
<li>full width page template (no sidebars)</li>
<li>new single page options panel with Ajax save function (no more page reloading to save)</li>
<li>drop-down login panel</li>
</ul>
<p>Those are all of the features I can think of right now.</p>
<p>Here is a sneak peak of the new options panel:</p>
<p><a class="highslide" href="http://bavotasan.com/wp-content/uploads/2010/01/magpremadmin.jpg"><img class="aligncenter size-medium wp-image-1633" title="magpremadmin" src="http://bavotasan.com/wp-content/uploads/2010/01/magpremadmin-570x300.jpg" alt="" width="570" height="300" /></a></p>
<p>Here is sample of the new design layout:</p>
<p><a class="highslide" href="http://bavotasan.com/wp-content/uploads/2010/01/magprem.jpg"><img class="aligncenter size-medium wp-image-1635" title="magprem" src="http://bavotasan.com/wp-content/uploads/2010/01/magprem-302x600.jpg" alt="" width="302" height="600" /></a>It still has a little ways to go so don&#8217;t be too judgmental.</p>
<hr />
<p style="font-size: 18px;">
<strong>WINNER #1</strong>: Matt &#8211; a more elaborate author page<br />
<strong>WINNER #2</strong>: tinym &#8211; presets and @font-face kits<br />
<strong>WINNER #3</strong>: Marcus &#8211; more control of the Read More link<br />
<strong>WINNER #4</strong>: Boris &#8211; choose the post&#8217;s thumbnail image<br />
<strong>WINNER #5</strong>: Scott &#8211; easily add links to the nav and sub-nav menus</p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2010/magazine-premium-is-almost-ready-and-i-want-to-give-away-5-free-copies/feed/</wfw:commentRss>
		<slash:comments>48</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>
		<item>
		<title>A Few Things to Keep In Mind When Using the More Tag in WordPress</title>
		<link>http://bavotasan.com/2009/a-few-things-to-keep-in-mind-when-using-the-more-tag-in-wordpress/</link>
		<comments>http://bavotasan.com/2009/a-few-things-to-keep-in-mind-when-using-the-more-tag-in-wordpress/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:36:29 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Break]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[everything]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[someone]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[while]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=319</guid>
		<description><![CDATA[I just had someone ask me why everything on their front page became bolded when they placed &#60;?php the_content('(more')); ?&#62; in their code to use in conjunction with the more tag in their posts. It took me a while to figure it out but the solution is pretty simple. The more tag looks like this [...]]]></description>
			<content:encoded><![CDATA[<p>I just had someone ask me why everything on their front page became bolded when they placed <code>&lt;?php the_content('(more')); ?&gt;</code> in their code to use in conjunction with the more tag in their posts. It took me a while to figure it out but the solution is pretty simple.<br />
<span id="more-319"></span><br />
The more tag looks like this in the Visual editor:<br />
<img class="aligncenter size-full wp-image-320" title="moretag" src="http://bavotasan.com/wp-content/uploads/2009/02/moretag.png" alt="moretag" width="26" height="24" /> </p>
<p>You use it to place a break in your post, so that only everything above will be displayed on the page where you placed <code>&lt;?php the_content('(more')); ?&gt;</code>.</p>
<p>If you accidentally place a more tag before some of your other tags are closed though, you can really mess things up. </p>
<p>What do I mean exactly? </p>
<p>If you wanted everything to be bolded or italicized, the opening tags would be at the beginning of you post and the closing tags would be at the end. But your more tag in the middle cuts your post down and the other tags never get closed. So on your front page, you have some opening tags but no closing tags. Hence everything be bolded or italicized.</p>
<p>The only solution I have been able to find is to use this pieces of code instead of the usual <code>&lt;?php the_content('(more')); ?&gt;</code>.</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$remove</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&lt;em&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;/em&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;strong&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&lt;/strong&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$remove</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> get_the_content<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(more)'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/a-few-things-to-keep-in-mind-when-using-the-more-tag-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

