<?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>Dimox.net - CSS, XHTML, jQuery and WordPress from Web Developer &#187; WordPress</title>
	<atom:link href="http://dimox.net/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://dimox.net</link>
	<description>CSS, XHTML, jQuery, WordPress</description>
	<lastBuildDate>Fri, 20 Aug 2010 16:48:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Say &#8220;Welcome back!&#8221; to Commentators on WordPress Using jQuery</title>
		<link>http://dimox.net/say-welcome-back-to-commentators-on-wordpress-using-jquery/</link>
		<comments>http://dimox.net/say-welcome-back-to-commentators-on-wordpress-using-jquery/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 11:53:18 +0000</pubDate>
		<dc:creator>Dimox</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[comment form]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://dimox.net/?p=21</guid>
		<description><![CDATA[I wrote a small jQuery script, which aims to improve the convenience of commenting on WordPress site, and I want to share it with you.

The essence of the script is as follows: it shows a welcome message for regular commentators.]]></description>
			<content:encoded><![CDATA[<p>I wrote a small jQuery script, which aims to improve the convenience of commenting on WordPress site, and I want to share it with you.</p>
<p>The essence of the script is as follows: it shows a welcome message for regular commentators.</p>
<h3>How it works</h3>
<p>It&#8217;s very simple. Script checks whether the required fields <code>Name/E-mail</code> are filled and performs the following:</p>
<ul>
<li>If a visitor of your blog at least once left a comment, next time he will see a &#8220;<strong>Welcome back, %username%!</strong>&#8221; message at the comment form.</li>
<li>The <code>Name/E-mail/URL</code> fields will hide, there will be only comment field.</li>
<li>Commentator can change his data by clicking on &#8220;Edit&#8221; link.</li>
<li>If visitor has disabled JavaScript in his browser, he will see the full comment form.</li>
</ul>
<p>For working the script it&#8217;s necessary to satisfy the two conditions:</p>
<ol>
<li>Cookies must work in visitor&#8217;s browser.</li>
<li>WordPress must remember a previously entered data in comment form.</li>
</ol>
<p>Always be sure that the second condition is satisfied, otherwise there will no sense in connecting the script. I know what some WordPress plugins can prevent to output entered data in the comment form.</p>
<h3>Examples</h3>
<ol>
<li>If you at least once left a comment on this blog, you will see &#8220;Welcome back&#8221; message near the comment form.</li>
<li>Also you can see an example on a separate page:</li>
</ol>
<div class="download">
<div class="dl">
<div class="demo"><a href="http://dimox.net/demo/welcome-back-commentator.html">View Demo</a></div>
<div class="leftFold"></div>
</div>
</div>
<h3>How to use it</h3>
<ol>
<li>
<p>Find in the <code>comments.php</code> file of your theme the code of a name, e-mail and URL fields and wrap them into the <code>&lt;div id="authorData">&lt;/div></code> container.</p>
<p>I&#8217;ll show an example with default WordPress theme.</p>
<p>Before:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;1&quot; <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;aria-required='true'&quot;</span>; ?&gt;</span> /&gt;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Name <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;(required)&quot;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author_email); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;2&quot; <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;aria-required='true'&quot;</span>; ?&gt;</span> /&gt;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Mail (will not be published) <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;(required)&quot;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author_url); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;3&quot; /&gt;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Website<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

<p>After:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;authorData&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;1&quot; <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;aria-required='true'&quot;</span>; ?&gt;</span> /&gt;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;author&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Name <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;(required)&quot;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author_email); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;2&quot; <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;aria-required='true'&quot;</span>; ?&gt;</span> /&gt;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Mail (will not be published) <span style="color: #009900;">&lt;?php if <span style="color: #66cc66;">&#40;</span>$req<span style="color: #66cc66;">&#41;</span> echo <span style="color: #ff0000;">&quot;(required)&quot;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo esc_attr($comment_author_url); ?&gt;</span></span>&quot; size=&quot;22&quot; tabindex=&quot;3&quot; /&gt;
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;url&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">small</span>&gt;</span>Website<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">small</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

</li>
<li>
<p>Connect the following jQuery script to your site (and also don&#8217;t forget to connect the jQuery framework, if it still isn&#8217;t connected):</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #003366; font-weight: bold;">var</span> author <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#author'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> author <span style="color: #339933;">!=</span><span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#email'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span><span style="color: #3366CC;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#authorData'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#authorData'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">before</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div id=&quot;welcome&quot;&gt;Welcome back, &lt;strong&gt;'</span> <span style="color: #339933;">+</span> author <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/strong&gt;! &lt;a href=&quot;#&quot;&gt;Edit &amp;raquo;&lt;/a&gt;&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#welcome a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toggle</span><span style="color: #009900;">&#40;</span>
      <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#authorData'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Minimize &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
      <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#authorData'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Edit &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span></pre></div></div>

</li>
<li>That&#8217;s all.</li>
</ol>
<p>I think the commentators of you site will appreciate this feature ;0)</p>
]]></content:encoded>
			<wfw:commentRss>http://dimox.net/say-welcome-back-to-commentators-on-wordpress-using-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery Comment Preview WordPress Plugin</title>
		<link>http://dimox.net/jquery-comment-preview-wordpress-plugin/</link>
		<comments>http://dimox.net/jquery-comment-preview-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 16:00:45 +0000</pubDate>
		<dc:creator>Dimox</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://dimox.net/?p=17</guid>
		<description><![CDATA[<strong>jQuery Comment Preview WordPress Plugin</strong> allows the live comment preview without page reboot. It works on jQuery.

Requires WordPress version: <strong>2.5 or higher</strong>.

You can see an example on a current site.]]></description>
			<content:encoded><![CDATA[<p><strong>jQuery Comment Preview WordPress Plugin</strong> allows the live comment preview without page reboot. It works on jQuery.</p>
<p>Requires WordPress version: <strong>2.3 or higher</strong>.</p>
<p>You can see an example on a current site.</p>
<h3>Plugin features</h3>
<ul>
<li>Live comment preview, which does not take that extra space on the page.</li>
<li>Simple HTML-editor (instructions on using the editor are on the plugin options page).</li>
<li>You can customize comment preview block as you wish. You can display: comment author name, avatar (static or dinamic using gravatar.com), comment date and time, comment text. All this can be designed with CSS.</li>
<li>You may don&#8217;t connect plugin&#8217;s CSS file (optional) if you wish to reduce number of queries to your server.</li>
<li>Plugin&#8217;s JS and CSS files are connected only on the pages with comment form.</li>
</ul>
<h3>Download</h3>
<p><strong style="color:red">Attention:</strong> knowledge of CSS and HTML may require for using a plugin.</p>
<div class="download">
<div class="dl">
<h3><a href="http://downloads.wordpress.org/plugin/jquery-comment-preview.0.2.zip">jQuery Comment Preview WordPress Plugin</a></h3>
<p>Version: <strong>0.2</strong> / Last updated: <strong>05.02.2010</strong></p>
<div class="leftFold"></div>
</div>
</div>
<h3>Donation</h3>
<p>If you enjoy this plugin, you can thank me and leave a small donation.</p>
<p><a class="donate" href="http://dimox.net/visavi/" title="Donate" target="_blank">Donation</a></p>
<h3>Installation</h3>
<ol>
<li>Upload <code>jquery-comment-preview</code> folder to the <code>/wp-content/plugins/</code> directory.</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in admin interface of WordPress.</li>
<li>Play once with the <code>width</code> parameter of <code>#jquery-comment-wrap</code>, <code>#jquery-comment-preview</code> and <code>#comment_preview</code> identifiers (which are in the <code>jquery-comment-preview.css</code> file) to fit the width under your design.</li>
<li>If it&#8217;s necessary, you can customize options in admin interface at the <code>Options &rarr; jQuery Comment Preview</code> page.</li>
<li>If it&#8217;s necessary, you can edit other CSS styles for comment preview block in the <code>jquery-comment-preview.css</code> file.</li>
<li>That&#8217;s all.</li>
</ol>
<h3>HTML code of preview block</h3>
<p>The plugin creates the following structure of HTML code for the preview block (this may be useful in the design through CSS):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery-comment-wrap&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery-comment-preview&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;html-editor&quot;</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span>&gt;</span>button<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span>&gt;</span>button<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
      ...
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;preview-tab&quot;</span>&gt;</span>Preview<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;comment&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<h3>If nothing works</h3>
<ol>
<li>Make sure that you use the appropriate version of WordPress, which is required for a plugin work.</li>
<li>
<p>Make sure that the <code>header.php</code> file of your theme has the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_head<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></pre></div></div>

<p>If not, insert it before the <code>&lt;/head&gt;</code> tag.</p>
</li>
<li>If the first 2 points are not solved the problem, give details in comments to this post.</li>
</ol>
<h3 id="versionHistory">Version history</h3>
<div id="history">
<ul>
<li><strong>Version 0.2</strong> (05.02.10):
<ul>
<li>text links in the preview now are clickable;</li>
<li>new option: &#8216;Add the target=&#8221;_blank&#8221; parameter to external links&#8217;;</li>
<li>new option: &#8216;Show button with WordPress smilies&#8217; &#8211; uses build-in WordPress smiles;</li>
<li>added French localization (thanks to <a href="http://www.wolforg.eu/" target="_blank">Wolforg</a>).</li>
</ul>
</li>
<li><strong>Version 0.1.7</strong> (03.18.10):
<ul>
<li>solved the problem, when preview did not work until the &#8220;Update Options&#8221; button not been pressed on a plugin options page;</li>
<li>jQuery 1.4.2 is now connected instead of jQuery 1.3.2.</li>
</ul>
</li>
<li><strong>Version 0.1.6</strong> (01.05.10):
<ul>
<li>solved the problem, when a tags have been inserted incorrectly in Internet Explorer when using the HTML editor;</li>
<li>adding a link now works like in WordPress HTML editor &#8211; when &#8216;link&#8217; button is clicked, there appear a window for entering a URL.</li>
</ul>
</li>
<li><strong>Version 0.1.5</strong> (12.20.09):
<ul>
<li>the design of preview panel has been changed. Now it looks like WordPress HTML editor;</li>
<li>the structure of the template of the HTML editor has been changed;</li>
<li>the script connects now to the <code>name</code> parameter of the <code>textarea</code> tag, but not to <code>id</code>;</li>
<li>solved the problem, when in some cases preview did not work;</li>
<li>the plugin&#8217;s JS and CSS files connects now in the <code>head</code> section of the page code;</li>
<li>jQuery now comes from Google.</li>
</ul>
</li>
<li><strong>Version 0.1.4</strong> (06.20.09):
<ul>
<li>added ability to indicate the value of the <code>id</code> acoderibute of the <code>textarea</code> tag;</li>
<li>added ability to insert comment date and time in preview block template;</li>
<li>added the option for displaying avatars from gravatar.com.</li>
</ul>
</li>
<li><strong>Version 0.1.3</strong> (02.07.09):
<ul>
<li>fine-tuned filters of text formacodeing in preview;</li>
<li>deleted automatic ficodeing the width of the preview panel under width of a <code>&lt;textarea&gt;</code> field, now need to change its width through CSS, for this you need to play once with the <code>width</code> parameter of <code>#jquery-comment-wrap</code> and <code>#jquery-comment-preview</code> identifiers, which are in the <code>jquery-comment-preview.css</code> file.</li>
</ul>
</li>
<li><strong>Version 0.1.2</strong> (12.19.08): the changes associated with incorrect display of the comment form in Internet Explorer on some WordPress themes.</li>
<li><strong>Version 0.1.1</strong> (12.17.08): fixed bug: the comment can not be submited.</li>
<li><strong>Version 0.1</strong> (12.16.08): the initial version.</li>
</ul>
</div>
<p><!-- #history --></p>
]]></content:encoded>
			<wfw:commentRss>http://dimox.net/jquery-comment-preview-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Wordpress Breadcrumbs Without a Plugin</title>
		<link>http://dimox.net/wordpress-breadcrumbs-without-a-plugin/</link>
		<comments>http://dimox.net/wordpress-breadcrumbs-without-a-plugin/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 06:03:00 +0000</pubDate>
		<dc:creator>Dimox</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[breadcrumbs]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://dimox.net/?p=8</guid>
		<description><![CDATA[Breadcrumbs is an important element of a web site navigation, which boosts his usability. Especially it concerns to a sites with a complex structure. Unfortunatelly, I don't use breadcrumbs on my sites, may be because their structure is very simple or because I could not find a way of making breadcrumbs, suitable for me.

I have seen a different ways of a breadcrumbs implementation on WordPress sites, but not one of them I does not like, because all of them does not display a full chain of links. So I have created my version of <strong>WordPress breadcrumbs without a plugin</strong>.

Yes, there is a ready plugins for WordPress breadcrumbs, but I prefer to use a short code snippets, which doing the same.]]></description>
			<content:encoded><![CDATA[<p>Breadcrumbs is an important element of a web site navigation, which boosts his usability. Especially it concerns to a sites with a complex structure. Unfortunatelly, I don&#8217;t use breadcrumbs on my sites, may be because their structure is very simple or because I could not find a way of making breadcrumbs, suitable for me.</p>
<p>I have seen a different ways of a breadcrumbs implementation on WordPress sites, but not one of them I does not like, because all of them does not display a full chain of links. So I have created my version of <strong>WordPress breadcrumbs without a plugin</strong>.</p>
<p>Yes, there is a ready plugins for WordPress breadcrumbs, but I prefer to use a short code snippets, which doing the same.</p>
<h3>Features of my version of WordPress breadcrumbs</h3>
<ul>
<li>
<strong>Displays a full chain of links</strong> to the current page. For example, if the current post is in a second level category, so breadcrumbs will looks like this:</p>
<p><code>Home &raquo; Category &raquo; Subcategory &raquo; Post Title</code></p>
<p>But all, what I have seen, displays only such an option (excluding plugins):</p>
<p><code>Home &raquo; Subcategory &raquo; Post Title</code></p>
<p>The same applies to pages and subpages. For example, for a 3rd level page breadcrumbs will looks like this:</p>
<p><code>Home &raquo; Page Level 1 &raquo; Page Level 2 &raquo; Page Level 3</code>
	</li>
<li>
Breadcrumbs is appearing on a following types of WordPress pages:</p>
<ul>
<li>paged navigation (like <code>sitename.com/page/2/</code>);</li>
<li>category archive;</li>
<li>tag archive;</li>
<li>daily archive;</li>
<li>monthly archive;</li>
<li>yearly archive;</li>
<li>author archive;</li>
<li>single post page;</li>
<li>single page;</li>
<li>attachment page;</li>
<li>search results;</li>
<li>404 error page.</li>
</ul>
</li>
<li>
<p>adding a page number (if archive page is second or more);</p>
</li>
<li>
<p>custom symbol of delimiter;</p>
</li>
<li>
<p>custom text for a &#8216;Home&#8217; link;</p>
</li>
<li>
<p>current crumb styling.</p>
</li>
</ul>
<h3>WordPress breadcrumbs function code</h3>

<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
92
93
94
95
96
97
98
99
100
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> dimox_breadcrumbs<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&amp;raquo;'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Home'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//text for the 'Home' link</span>
  <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;span class=&quot;current&quot;&gt;'</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$currentAfter</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_home<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>is_front_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_paged<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div id=&quot;crumbs&quot;&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$home</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$home</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<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;">global</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$cat_obj</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_queried_object</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$thisCat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat_obj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term_id</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$thisCat</span> <span style="color: #339933;">=</span> get_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisCat</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$parentCat</span> <span style="color: #339933;">=</span> get_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisCat</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisCat</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parent</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span>get_category_parents<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parentCat</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Archive by category &amp;#39;'</span><span style="color: #339933;">;</span>
      single_cat_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&amp;#39;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_day<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: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_year_link<span style="color: #009900;">&#40;</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_month_link<span style="color: #009900;">&#40;</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'m'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'F'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'d'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_month<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: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_year_link<span style="color: #009900;">&#40;</span>get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'F'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_year<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: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>is_attachment<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: #000088;">$cat</span> <span style="color: #339933;">=</span> get_the_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> get_category_parents<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span><span style="color: #339933;">;</span>
      the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_attachment<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: #000088;">$parent</span> <span style="color: #339933;">=</span> get_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> get_the_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent</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: #000088;">$cat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> get_category_parents<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$parent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt; '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span><span style="color: #339933;">;</span>
      the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span><span style="color: #339933;">;</span>
      the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$parent_id</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$breadcrumbs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$page</span> <span style="color: #339933;">=</span> get_page<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parent_id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$breadcrumbs</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</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: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$page</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: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$parent_id</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$page</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_parent</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #000088;">$breadcrumbs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_reverse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$breadcrumbs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$breadcrumbs</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$crumb</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$crumb</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$delimiter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span><span style="color: #339933;">;</span>
      the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_search<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: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Search results for &amp;#39;'</span> <span style="color: #339933;">.</span> get_search_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&amp;#39;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_tag<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: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Posts tagged &amp;#39;'</span><span style="color: #339933;">;</span>
      single_tag_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&amp;#39;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_author<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;">global</span> <span style="color: #000088;">$author</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$userdata</span> <span style="color: #339933;">=</span> get_userdata<span style="color: #009900;">&#40;</span><span style="color: #000088;">$author</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Articles posted by '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$userdata</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display_name</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_404<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: #b1b100;">echo</span> <span style="color: #000088;">$currentBefore</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'Error 404'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currentAfter</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'paged'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_day<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_month<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_year<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' ('</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Page'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' '</span> <span style="color: #339933;">.</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'paged'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_day<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_month<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_year<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">')'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Simply paste this function into a <code>functions.php</code> file of your theme and then paste the following code in a place of your theme, where breadcrumbs must appearing:</p>

<div class="wp_syntax"><div 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><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'dimox_breadcrumbs'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> dimox_breadcrumbs<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></pre></div></div>

<p>All that remains to do for now, is to design your breadcrumbs with CSS. You can use <code>#crumbs</code> for styling breadcrumbs block and <code>#crumbs .current</code> for styling a current crumb.</p>
<p>Function works on <strong>WordPress 2.5 or higher</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimox.net/wordpress-breadcrumbs-without-a-plugin/feed/</wfw:commentRss>
		<slash:comments>136</slash:comments>
		</item>
		<item>
		<title>A Great Way of WordPress Internal Linking for SEO</title>
		<link>http://dimox.net/a-great-way-of-wordpress-internal-linking-for-seo/</link>
		<comments>http://dimox.net/a-great-way-of-wordpress-internal-linking-for-seo/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 15:05:57 +0000</pubDate>
		<dc:creator>Dimox</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://dimox.net/?p=5</guid>
		<description><![CDATA[As you may already know, web site's internal linking is one of the important methods for boost his search engine ranking. So you should not neglect this, if you have such opportunity.

One my familiar blogger gave me a very great idea about internal articles linking, which he implemented on his web sites.

I decided to <strong>make this thing for WordPress</strong>, because I am using this blogging engine on my blogs.]]></description>
			<content:encoded><![CDATA[<p>As you may already know, web site&#8217;s internal linking is one of the important methods for boost his search engine ranking. So you should not neglect this, if you have such opportunity.</p>
<p>One my familiar blogger gave me a very great idea about internal articles linking, which he implemented on his web sites.</p>
<p>I decided to <strong>make this thing for WordPress</strong>, because I am using this blogging engine on my blogs.</p>
<p>What is the essense of idea? We put on the blog an additional block with the list of <strong>previous articles from the same category</strong> chronologically (PHP-script looks publication date). For example, if we show the 5 previous articles and the current article have an ID = 7, so in this list we will see articles with IDs 6, 5, 4, 3 and 2.</p>
<p>But it&#8217;s not all. I did also the <strong>ring linking structure</strong>, i.e. if current article is the first from the category, in the list we&#8217;ll see the most recent posts from that category. For example, category have 10 articles and we show again 5 posts in &#8220;previous&#8221;. So when we get on the 3rd article, &#8220;previous from the category&#8221; will contain the links on articles: 2, 1, 10, 9 and 8.</p>
<p>As a result each article will recieve the same number of links to itself (<strong>5 permanent links</strong>, if look on example above) and all articles fall in to web site internal linking.</p>
<p>Now lets take a look on the code (do not be alarmed, it&#8217;s quite big):</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
</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: #000088;">$li</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// number of links to show in the list</span>
<span style="color: #000088;">$postID</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: #339933;">;</span>
<span style="color: #000088;">$postDate1</span> <span style="color: #339933;">=</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'YmdHis'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> get_the_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_ID</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$catQuery</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'showposts=-1&amp;cat='</span><span style="color: #339933;">.</span><span style="color: #000088;">$cat</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$catQuery</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$catQuery</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_count</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$catQuery</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><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: #000088;">$catQuery</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$postDate2</span> <span style="color: #339933;">=</span> get_the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'YmdHis'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$postDate2</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$postDate1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$postID</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$li</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</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> 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>&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">endwhile</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: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$li</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$cat_count</span> <span style="color: #339933;">=</span> get_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">category_count</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;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat_count</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posts</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$temp_query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cat_count</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$li</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cat_count</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span>
      query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'showposts='</span><span style="color: #339933;">.</span><span style="color: #000088;">$posts</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;cat='</span><span style="color: #339933;">.</span><span style="color: #000088;">$cat</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<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: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<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;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</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> 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>&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
      <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$wp_query</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$temp_query</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> wp_reset_query<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></pre></td></tr></table></div>

<p>This code you need to put in the <code>single.php</code> file of your WordPress theme. I hope you are familiar with the structure of WP themes? =) If no, <a href="http://codex.wordpress.org/Main_Page" target="_blank">WordPress Codex</a> will help you.</p>
<p>The template of the link in this code is looks like (it comes across 2 times):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php the_permalink() ?&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;?php the_title<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span></pre></div></div>

<p>In this template you can use the same PHP tags like in default WordPress loop.</p>
<p>I have tested the code on <strong>WordPress 2.8.x</strong> and can&#8217;t guarantee the work on another verisons.</p>
]]></content:encoded>
			<wfw:commentRss>http://dimox.net/a-great-way-of-wordpress-internal-linking-for-seo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
