<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: 不用任何插件实现 WordPress 的彩色标签云</title> <atom:link href="http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/feed/" rel="self" type="application/rss+xml" /><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/</link> <description>走点路，走自己牛逼的路，让那些个傻逼去说吧！</description> <lastBuildDate>Sun, 15 Jan 2012 07:04:21 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: toptpe</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20628</link> <dc:creator>toptpe</dc:creator> <pubDate>Wed, 26 Oct 2011 15:02:20 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20628</guid> <description>呵呵，感谢大侠啊</description> <content:encoded><![CDATA[<p>呵呵，感谢大侠啊</p> ]]></content:encoded> </item> <item><title>By: iClyde</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20487</link> <dc:creator>iClyde</dc:creator> <pubDate>Sat, 15 Oct 2011 07:43:45 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20487</guid> <description>效果不错诶，谢谢分享！</description> <content:encoded><![CDATA[<p>效果不错诶，谢谢分享！</p> ]]></content:encoded> </item> <item><title>By: 鳳梨果凍</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20469</link> <dc:creator>鳳梨果凍</dc:creator> <pubDate>Fri, 14 Oct 2011 07:02:36 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-20469</guid> <description>这个好~~~~彩色标签很好看&gt;,&lt;</description> <content:encoded><![CDATA[<p>这个好~~~~彩色标签很好看&gt;,&lt;</p> ]]></content:encoded> </item> <item><title>By: 幸福每一天</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-19676</link> <dc:creator>幸福每一天</dc:creator> <pubDate>Mon, 01 Aug 2011 13:33:27 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-19676</guid> <description>想请问下怎样实现不同页面显示指定的标签，望解答，谢谢！ :-D</description> <content:encoded><![CDATA[<p>想请问下怎样实现不同页面显示指定的标签，望解答，谢谢！ <img src='//files.zou.lu/style/img/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: 邓肯</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18990</link> <dc:creator>邓肯</dc:creator> <pubDate>Thu, 12 May 2011 01:15:12 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18990</guid> <description>找的就是它  搞定</description> <content:encoded><![CDATA[<p>找的就是它  搞定</p> ]]></content:encoded> </item> <item><title>By: 不用插件实现WordPress彩色标签云 &#124; upall &#039;s blog</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18837</link> <dc:creator>不用插件实现WordPress彩色标签云 &#124; upall &#039;s blog</dc:creator> <pubDate>Sat, 16 Apr 2011 06:35:08 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18837</guid> <description>[...] ＜完。摘自：走点路博客＞         RSS feed for comments on this post &#124; TrackBack URL &#124; 留下评论 [...]</description> <content:encoded><![CDATA[<p>[...] ＜完。摘自：走点路博客＞         RSS feed for comments on this post | TrackBack URL | 留下评论 [...]</p> ]]></content:encoded> </item> <item><title>By: 无插件实现 WordPress 彩色标签 &#8211; 烙 印</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18696</link> <dc:creator>无插件实现 WordPress 彩色标签 &#8211; 烙 印</dc:creator> <pubDate>Sun, 27 Mar 2011 02:27:37 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-18696</guid> <description>[...] 来自：走点路 [...]</description> <content:encoded><![CDATA[<p>[...] 来自：走点路 [...]</p> ]]></content:encoded> </item> <item><title>By: sinsky</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17572</link> <dc:creator>sinsky</dc:creator> <pubDate>Sat, 20 Nov 2010 23:39:54 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17572</guid> <description>问下  那个显示链接的插件怎么实现的，如果是插件是什么插件 能告诉我么。~ 谢谢  邮件发给我就可以了~</description> <content:encoded><![CDATA[<p>问下  那个显示链接的插件怎么实现的，如果是插件是什么插件 能告诉我么。~ 谢谢  邮件发给我就可以了~</p> ]]></content:encoded> </item> <item><title>By: ceramicschina</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17544</link> <dc:creator>ceramicschina</dc:creator> <pubDate>Tue, 16 Nov 2010 11:42:33 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17544</guid> <description>的确很NB，文章写的不错，特来顶一下！！！</description> <content:encoded><![CDATA[<p>的确很NB，文章写的不错，特来顶一下！！！</p> ]]></content:encoded> </item> <item><title>By: roger</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17363</link> <dc:creator>roger</dc:creator> <pubDate>Sat, 30 Oct 2010 08:40:50 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17363</guid> <description>炫是很炫
就是花了点
颜色可以都设置为暖色? :wink:  :wink:</description> <content:encoded><![CDATA[<p>炫是很炫<br /> 就是花了点<br /> 颜色可以都设置为暖色? <img src='//files.zou.lu/style/img/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' /> <img src='//files.zou.lu/style/img/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: General</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17224</link> <dc:creator>General</dc:creator> <pubDate>Thu, 21 Oct 2010 10:10:22 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-17224</guid> <description>:wink: 谢谢啊！！</description> <content:encoded><![CDATA[<p> <img src='//files.zou.lu/style/img/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' /> 谢谢啊！！</p> ]]></content:encoded> </item> <item><title>By: 九唔搭八</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16834</link> <dc:creator>九唔搭八</dc:creator> <pubDate>Sat, 02 Oct 2010 14:50:36 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16834</guid> <description>:wink: 拿去用了！</description> <content:encoded><![CDATA[<p> <img src='//files.zou.lu/style/img/smilies/icon_wink.gif' alt=':wink:' class='wp-smiley' /> 拿去用了！</p> ]]></content:encoded> </item> <item><title>By: 无插件实现WordPress彩色标签云 &#124; 二酉社</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16148</link> <dc:creator>无插件实现WordPress彩色标签云 &#124; 二酉社</dc:creator> <pubDate>Wed, 11 Aug 2010 08:58:20 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16148</guid> <description>[...] 文章转载自：走点路 [...]</description> <content:encoded><![CDATA[<p>[...] 文章转载自：走点路 [...]</p> ]]></content:encoded> </item> <item><title>By: 无插件实现WordPress彩色标签云 &#124; 二酉社</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16120</link> <dc:creator>无插件实现WordPress彩色标签云 &#124; 二酉社</dc:creator> <pubDate>Sat, 07 Aug 2010 08:46:26 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-16120</guid> <description>[...] 原文链接：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</description> <content:encoded><![CDATA[<p>[...] 原文链接：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</p> ]]></content:encoded> </item> <item><title>By: 摩凝(M.Chan)</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15826</link> <dc:creator>摩凝(M.Chan)</dc:creator> <pubDate>Wed, 21 Jul 2010 11:36:32 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15826</guid> <description>非常有用，谢谢分享^_^</description> <content:encoded><![CDATA[<p>非常有用，谢谢分享^_^</p> ]]></content:encoded> </item> <item><title>By: 依水居</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15652</link> <dc:creator>依水居</dc:creator> <pubDate>Mon, 05 Jul 2010 16:00:48 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15652</guid> <description>搞出了乱码。。。杯具啊。。 :evil:</description> <content:encoded><![CDATA[<p>搞出了乱码。。。</p><p>杯具啊。。 <img src='//files.zou.lu/style/img/smilies/icon_evil.gif' alt=':evil:' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: 不用任何插件实现 WordPress 彩色标签云 - WordPress_阿七实验室</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15624</link> <dc:creator>不用任何插件实现 WordPress 彩色标签云 - WordPress_阿七实验室</dc:creator> <pubDate>Sat, 03 Jul 2010 18:07:36 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15624</guid> <description>[...] WordPress database error: [Duplicate entry &#039;post-410&#039; for key 1] INSERT INTO wp_postviewsplus (count_type, count_id, look_ip, look_ip_time) VALUES (&quot;post&quot;, &quot;410&quot;, &quot;&quot;, &quot;1278191256&quot;) /* *//*]]&gt;*/ 不用任何插件实现 WordPress 彩色标签云Posted by 阿七 on 六月 12th, 2010 12人围观阿七说：近日看到很多朋友的blog标签云都是五颜六色的，非常绚丽，于是也想借来用用，忽一日在showfom的blog上看到了这篇文章，拿来转载。以下多为转载，鲜有自写。侧边栏的标签云（Tag Cloud）一直是 WordPress 2.3+ 以后的内置功能，一般直接调用函数 wp_tag_cloud 或者在 Widgets 里开启即可，但是默认的全部是一个颜色，只是大小不一样，很是不顺眼，虽然可以用 Simple Tags 之类的插件，但是总感觉不爽，所以我介绍一个不用任何插件就能显示彩色标签云的方法。方法是 Alex 的英文站那里看来的，直接拿来主义和大家分享之。【此为本文作者原话，我是从showfom的博客里看到的】PS：貌似是冰古兄弟原创。后台编辑主题的 functions.php , 输入以下代码function colorCloud($text) { $text = preg_replace_callback(&#039;&#124;&lt;a (.+?)&gt;&#124;i&#039;, &#039;colorCloudCallback&#039;, $text); return $text; } function colorCloudCallback($matches) { $text = $matches[1]; $color = dechex(rand(0,16777215)); $pattern = &#039;/style=(&#039;&#124;&quot;)(.*)(&#039;&#124;&quot;)/i&#039;; $text = preg_replace($pattern, &quot;style=&quot;color:#{$color};$2;&quot;&quot;, $text); return &quot;&lt;a $text&gt;&quot;; } add_filter(&#039;wp_tag_cloud&#039;, &#039;colorCloud&#039;, 1);可以看到，颜色是随机的，可以自行修改 $color = dechex(rand(0,16777215));  这行来修改范围，这样就很炫耀哈哈。然后在侧边栏 sidebar.php 里调用如下代码：&lt;?php wp_tag_cloud(&#039;smallest=8&amp;largest=24&amp;number=50&#039;); ?&gt;即可，8 是最小的 tag 的字体大小（用的最少的 tag），24 是最大的（用的最多的 tag），50 是 tag 的数目，可以自行修改。假如你是个主题高手，直接集成在主题里那一定很帅！效果可以看本文右边侧边栏的标签栏：本站背景现为白色，可能有些刺眼。  标签：Wordpress, 标签云  &#171; 搜索故事会：SEW和Donews 谷歌说：图片描述 &#187;  萧涵2010-06-13,2:54 上午  不错的方法，谢谢分享[回复] 赵实丰的文摘2010-07-01,10:17 下午  [...] 不用任何插件实现 WordPress 彩色标签云 &#8211; 建站实验室_阿七实验室. [...]访客留言 [...]</description> <content:encoded><![CDATA[<p>[...] WordPress database error: [Duplicate entry &#39;post-410&#39; for key 1] INSERT INTO wp_postviewsplus (count_type, count_id, look_ip, look_ip_time) VALUES (&quot;post&quot;, &quot;410&quot;, &quot;&quot;, &quot;1278191256&quot;) /* *//*]]&gt;*/ 不用任何插件实现 WordPress 彩色标签云Posted by 阿七 on 六月 12th, 2010 12人围观阿七说：近日看到很多朋友的blog标签云都是五颜六色的，非常绚丽，于是也想借来用用，忽一日在showfom的blog上看到了这篇文章，拿来转载。以下多为转载，鲜有自写。侧边栏的标签云（Tag Cloud）一直是 WordPress 2.3+ 以后的内置功能，一般直接调用函数 wp_tag_cloud 或者在 Widgets 里开启即可，但是默认的全部是一个颜色，只是大小不一样，很是不顺眼，虽然可以用 Simple Tags 之类的插件，但是总感觉不爽，所以我介绍一个不用任何插件就能显示彩色标签云的方法。方法是 Alex 的英文站那里看来的，直接拿来主义和大家分享之。【此为本文作者原话，我是从showfom的博客里看到的】PS：貌似是冰古兄弟原创。后台编辑主题的 functions.php , 输入以下代码function colorCloud($text) { $text = preg_replace_callback(&#39;|&lt;a (.+?)&gt;|i&#39;, &#39;colorCloudCallback&#39;, $text); return $text; } function colorCloudCallback($matches) { $text = $matches[1]; $color = dechex(rand(0,16777215)); $pattern = &#39;/style=(&#39;|&quot;)(.*)(&#39;|&quot;)/i&#39;; $text = preg_replace($pattern, &quot;style=&quot;color:#{$color};$2;&quot;&quot;, $text); return &quot;&lt;a $text&gt;&quot;; } add_filter(&#39;wp_tag_cloud&#39;, &#39;colorCloud&#39;, 1);可以看到，颜色是随机的，可以自行修改 $color = dechex(rand(0,16777215));  这行来修改范围，这样就很炫耀哈哈。然后在侧边栏 sidebar.php 里调用如下代码：&lt;?php wp_tag_cloud(&#39;smallest=8&amp;largest=24&amp;number=50&#39;); ?&gt;即可，8 是最小的 tag 的字体大小（用的最少的 tag），24 是最大的（用的最多的 tag），50 是 tag 的数目，可以自行修改。假如你是个主题高手，直接集成在主题里那一定很帅！效果可以看本文右边侧边栏的标签栏：本站背景现为白色，可能有些刺眼。  标签：Wordpress, 标签云  &laquo; 搜索故事会：SEW和Donews 谷歌说：图片描述 &raquo;  萧涵2010-06-13,2:54 上午  不错的方法，谢谢分享[回复] 赵实丰的文摘2010-07-01,10:17 下午  [...] 不用任何插件实现 WordPress 彩色标签云 &#8211; 建站实验室_阿七实验室. [...]访客留言 [...]</p> ]]></content:encoded> </item> <item><title>By: 不用任何插件实现 WordPress 彩色标签云 &#8211; 建站实验室_阿七实验室 &#187; 赵实丰的文摘</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15607</link> <dc:creator>不用任何插件实现 WordPress 彩色标签云 &#8211; 建站实验室_阿七实验室 &#187; 赵实丰的文摘</dc:creator> <pubDate>Thu, 01 Jul 2010 14:18:11 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15607</guid> <description>[...] 方法是 Alex 的英文站那里看来的，直接拿来主义和大家分享之。【此为本文作者原话，我是从showfom的博客里看到的】 [...]</description> <content:encoded><![CDATA[<p>[...] 方法是 Alex 的英文站那里看来的，直接拿来主义和大家分享之。【此为本文作者原话，我是从showfom的博客里看到的】 [...]</p> ]]></content:encoded> </item> <item><title>By: Showfom</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15526</link> <dc:creator>Showfom</dc:creator> <pubDate>Tue, 22 Jun 2010 20:39:02 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15526</guid> <description>&lt;a href=&quot;#comment-15524&quot; rel=&quot;nofollow&quot;&gt;@max&lt;/a&gt;, 注意标点符号，要英文半角</description> <content:encoded><![CDATA[<p><a href="#comment-15524" rel="nofollow">@max</a>, 注意标点符号，要英文半角</p> ]]></content:encoded> </item> <item><title>By: max</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15524</link> <dc:creator>max</dc:creator> <pubDate>Tue, 22 Jun 2010 02:25:04 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15524</guid> <description>我按文章的内容尝试过但是么有成功，不知道问题出在什么地方。如果方便的话联系我下~帮忙解决下，感谢</description> <content:encoded><![CDATA[<p>我按文章的内容尝试过但是么有成功，不知道问题出在什么地方。如果方便的话联系我下~帮忙解决下，感谢</p> ]]></content:encoded> </item> <item><title>By: 乱炖</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15354</link> <dc:creator>乱炖</dc:creator> <pubDate>Sat, 12 Jun 2010 22:50:14 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15354</guid> <description>呵呵，正好用上这个彩色标签云，谢谢~ :mrgreen:</description> <content:encoded><![CDATA[<p>呵呵，正好用上这个彩色标签云，谢谢~ <img src='//files.zou.lu/style/img/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: 不用任何插件实现 WordPress 的彩色标签云 &#171; Zeno&#39;s Blog</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15326</link> <dc:creator>不用任何插件实现 WordPress 的彩色标签云 &#171; Zeno&#39;s Blog</dc:creator> <pubDate>Wed, 09 Jun 2010 16:37:39 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15326</guid> <description>[...] 转自http://zou.lu/,另参考:冰古,Alex [...]</description> <content:encoded><![CDATA[<p>[...] 转自http://zou.lu/,另参考:冰古,Alex [...]</p> ]]></content:encoded> </item> <item><title>By: 鱼小北</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15259</link> <dc:creator>鱼小北</dc:creator> <pubDate>Thu, 03 Jun 2010 14:02:38 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-15259</guid> <description>兽兽这里好东西多啊~呵呵</description> <content:encoded><![CDATA[<p>兽兽小帅锅这里好东西多啊~呵呵</p> ]]></content:encoded> </item> <item><title>By: 柳亚的博客：储籽宫 www.liuya.org &#187; 简单代码实现WordPress 的彩色标签云</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-14791</link> <dc:creator>柳亚的博客：储籽宫 www.liuya.org &#187; 简单代码实现WordPress 的彩色标签云</dc:creator> <pubDate>Mon, 17 May 2010 00:57:28 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-14791</guid> <description>[...] 代码如下：  function colorCloud($text) { $text = preg_replace_callback(&#8216;&#124;&lt;a (.+?)&gt;&#124;i&#8217;, &#8216;colorCloudCallback&#8217;, $text); return $text; } function colorCloudCallback($matches) { $text = $matches[1]; $color = dechex(rand(0,16777215)); $pattern = &#8216;/style=(&#8217;&#124;&#8221;)(.*)(&#8217;&#124;&#8221;)/i&#8217;; $text = preg_replace($pattern, &#8220;style=&#8221;color:#{$color};$2;&#8221;&quot;, $text); return &#8220;&lt;a $text&gt;&#8221;; } add_filter(&#8216;wp_tag_cloud&#8217;, &#8216;colorCloud&#8217;, 1); 说明：8 是最小的 tag 的字体大小（用的最少的 tag），24 是最大的（用的最多的 tag），50 是 tag 的数目，可以自行修改。颜色是随机的，可以修改 $color = dechex(rand(0,16777215));  这行来修改范围。 参考：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</description> <content:encoded><![CDATA[<p>[...] 代码如下：  function colorCloud($text) { $text = preg_replace_callback(&#8216;|&lt;a (.+?)&gt;|i&#8217;, &#8216;colorCloudCallback&#8217;, $text); return $text; } function colorCloudCallback($matches) { $text = $matches[1]; $color = dechex(rand(0,16777215)); $pattern = &#8216;/style=(&#8217;|&#8221;)(.*)(&#8217;|&#8221;)/i&#8217;; $text = preg_replace($pattern, &#8220;style=&#8221;color:#{$color};$2;&#8221;&quot;, $text); return &#8220;&lt;a $text&gt;&#8221;; } add_filter(&#8216;wp_tag_cloud&#8217;, &#8216;colorCloud&#8217;, 1); 说明：8 是最小的 tag 的字体大小（用的最少的 tag），24 是最大的（用的最多的 tag），50 是 tag 的数目，可以自行修改。颜色是随机的，可以修改 $color = dechex(rand(0,16777215));  这行来修改范围。 参考：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</p> ]]></content:encoded> </item> <item><title>By: Wordpress 彩色标签云 &#124; What You See!</title><link>http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-14336</link> <dc:creator>Wordpress 彩色标签云 &#124; What You See!</dc:creator> <pubDate>Fri, 07 May 2010 15:55:54 +0000</pubDate> <guid isPermaLink="false">http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/#comment-14336</guid> <description>[...] 本文部分内容来源于：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</description> <content:encoded><![CDATA[<p>[...] 本文部分内容来源于：http://zou.lu/colorful-tag-cloud-without-any-plugin-in-wordpress/ [...]</p> ]]></content:encoded> </item> </channel> </rss>
