<?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>Keep Walking &#187; Tag Cloud</title>
	<atom:link href="http://www.aowaa.com/tag/tag-cloud/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aowaa.com</link>
	<description>Free Wordpress Theme, Make Money Online And Cool Gadgets</description>
	<lastBuildDate>Fri, 09 Jul 2010 15:44:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Add Colorful Tag Cloud without Any Plugin in WordPress</title>
		<link>http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/</link>
		<comments>http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 03:43:49 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Tag Cloud]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.aowaa.com/?p=216</guid>
		<description><![CDATA[The tags cloud page can show the most discussed topics to your readers.Using the wp_tag_cloud function can add the tag cloud in your wordpress page. You can learn more about wp_tag_cloud function from wordpress codex. But the default tag cloud in wordpress show in single color, it’s blankness and hard to read. So if you [...]]]></description>
			<content:encoded><![CDATA[<p>The tags cloud page can show the most discussed topics to your readers.Using the wp_tag_cloud function can add the tag cloud in your wordpress page. You can learn more about <a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud" target="_blank">wp_tag_cloud</a> function from wordpress codex. But the default tag cloud in wordpress show in single color, it’s blankness and hard to read. So if you make the tag cloud show up colorful, the readers can easily get your main topics and know what are you talking about in your blog.</p>
<div id="attachment_221" class="wp-caption alignnone" style="width: 405px"><img class="size-full wp-image-221 " title="color tag cloud" src="http://www.aowaa.com/wp-content/uploads/2009/08/color-tag-cloud.jpg" alt="color tag cloud" width="395" height="141" /><p class="wp-caption-text">Colorful Tag Cloud</p></div>
<p><span id="more-216"></span>If you have installed the <a href="http://wordpress.org/extend/plugins/simple-tags/" target="_blank">simple tags</a> wordpress plugin, you can use the function <code>&lt;?php st_tag_cloud(); ?&gt;</code> to add the <strong>colorful tag cloud</strong>. But if you didn’t, we can tell you an easily way to add the <a href="http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/" target="_self">colorful tag cloud</a> without any plugin in wordpress. You can see the demo from my <a href="http://www.aowaa.com/archive/tags/" target="_self">colorful tag cloud page</a>.</p>
<p>Firstly, open the <code>functions.php</code> file in your theme directory, copy the subjacent code and paste it in your functions.php file.</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
</pre></td><td class="code"><pre class="php" style="font-family:Consolas,Monaco,"Courier New",Courier,monospace;"><span style="color: #666666; font-style: italic;">//Start of colorful tag cloud</span>
<span style="color: #000000; font-weight: bold;">function</span> colorCloud<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace_callback</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'|&lt;a (.+?)&gt;|i'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'colorCloudCallback'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> colorCloudCallback<span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #990000;">dechex</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">16777215</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/style=(\'|\&quot;)(.*)(\'|\&quot;)/i'</span><span style="color: #339933;">;</span>
 <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;style=<span style="color: #000099; font-weight: bold;">\&quot;</span>color:#<span style="color: #006699; font-weight: bold;">{$color}</span>;<span style="color: #006699; font-weight: bold;">$2</span>;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;&lt;a <span style="color: #006699; font-weight: bold;">$text</span>&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_tag_cloud'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'colorCloud'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//End of colorful tag cloud</span></pre></td></tr></table></div>

<p>Add the subjacent code to where you want the tag cloud show. And it’s done, you can see the <a href="http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/" target="_self">colorful tag cloud</a> in your wordpress blog now.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:Consolas,Monaco,"Courier New",Courier,monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'smallest=8&amp;largest=24&amp;number=50'</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>

<hr />
<p><small>© Alex for <a href="http://www.aowaa.com">Keep Walking</a>, 2009. |
<a href="http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/">Permalink</a> |
<a href="http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/#comments">10 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/&title=How to Add Colorful Tag Cloud without Any Plugin in WordPress">del.icio.us</a>
<br/>
Post tags: <a href="http://www.aowaa.com/tag/hacks/" rel="tag">Hacks</a>, <a href="http://www.aowaa.com/tag/tag-cloud/" rel="tag">Tag Cloud</a>, <a href="http://www.aowaa.com/tag/tutorial/" rel="tag">Tutorial</a>, <a href="http://www.aowaa.com/tag/wordpress/" rel="tag">Wordpress</a><br/>
</small></p>
	<h3>Related posts: </h3>
	<ul class="st-related-posts">
	<li><a href="http://www.aowaa.com/how-to-get-thumbnail-automatically-from-wordpress-posts/" title="How to Get Thumbnail Automatically from WordPress Posts (April 24, 2009)">How to Get Thumbnail Automatically from WordPress Posts</a> (5)</li>
	<li><a href="http://www.aowaa.com/create-archives-page-without-any-plugin-wordpress/" title="How to Create Archives Page without Any Plugin in WordPress (September 2, 2009)">How to Create Archives Page without Any Plugin in WordPress</a> (2)</li>
	<li><a href="http://www.aowaa.com/how-to-add-spam-and-delete-action-links-to-wordpress-comments/" title="How to Add Spam and Delete Action Links to WordPress Comments (August 6, 2009)">How to Add Spam and Delete Action Links to WordPress Comments</a> (0)</li>
	<li><a href="http://www.aowaa.com/how-to-seo-your-wordpress-theme/" title="How to SEO Your WordPress Theme (December 18, 2008)">How to SEO Your WordPress Theme</a> (4)</li>
	<li><a href="http://www.aowaa.com/how-to-add-advertisement-between-posts-in-wordpress/" title="How to Add Advertisement Between Posts in WordPress (November 13, 2009)">How to Add Advertisement Between Posts in WordPress</a> (0)</li>
	<li><a href="http://www.aowaa.com/update-to-wordpress-27-and-change-the-theme/" title="Update to WordPress 2.7 And Change The Theme (December 12, 2008)">Update to WordPress 2.7 And Change The Theme</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.aowaa.com/how-to-add-colorful-tag-cloud-without-any-plugin-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
