<?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>等待-放飞梦想 &#187; WP相关</title>
	<atom:link href="http://leotheme.cn/category/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Wed, 25 Apr 2012 09:45:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress主题：perfct 1.0</title>
		<link>http://leotheme.cn/wordpress/wordpress-themes-perfct.html</link>
		<comments>http://leotheme.cn/wordpress/wordpress-themes-perfct.html#comments</comments>
		<pubDate>Thu, 01 Sep 2011 06:14:51 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[资源分享]]></category>
		<category><![CDATA[perfct]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[主题]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=903</guid>
		<description><![CDATA[已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已。在这段时间里，不是没有做过主题，很多时候，一时有了好想法。就开始写，往往是写了个首页。或头部就又写不下去了。前几天摄神发布了prower v4。看到之后，又有冲动了。于是把之前的一款放在那几个月了的主题继续整整。成了现在的perfct。 主题说明： 自定义菜单，且支持二级下拉菜单； 置顶文章区别显示； 侧边栏小工具(如何添加小工具？) 内容页侧边栏显示同分类下的最新文章； 分类页顶部显示分类名称及描述；(分类描述添加修改) 评论嵌套回复；(如何开启评论的嵌套回复？) 此主题没啥特别功能。且不再向IE6兼容。我自己测试了下，有一些小地方不兼容。所以，关于IE6的样式问题，请不要找偶。插件方面浏览次数需要“wp-postviews”支持。没装不会显示。其他的暂无！ 后话： 计划在这个基础上作一些丰富的效果扩展。 兼容性修复。支持IE系列，firefox,Google Chrome等浏览器 自定义管理工具栏，默认的那个黑条条实在是太纠结了。 弹出层登录，信息提示效果。 缩略图，焦点图等效果。 主题后台功能设置 绑定腾讯微博 Ajax评论 相册，图片缩放等效果 集成表情、头像缓存功能 管理工具栏效果： 弹出登录效果： 提示信息效果： 暂时只想到这么多了。反正会慢慢折腾。直到满意为止！ 下载地址：perfct-v1.0 相关文章2009-06-13 -- 主题Dreamy更新到v2.0 [06-18 00:08] (61)距离这个主题发布上一版已经差不多两个月了，而这个主题我一直在修修改改。虽然很多同学问我要我BLOG用的版本，但很多地方没有完善，所以一直没有发布自己用的版本。但现在好了，终于可以发布这个新的版本了。这...2009-06-07 -- 黑莓主题的改版总算完成了 (16)这次改版很顺利，也没花多少时间。从设计到完成代码用了两天多时间；之所以这么快是因为主题是基于Dreamy这个主题的；大家可以看得出，有很多地方都相似，但细节方面有不少的修改；不废话了。看下最初的设计稿...2009-03-31 -- 新主题预览图 (18)自从发布Maxthon v2.0后，已经很久没有出新主题了。其中有太多原因了，其实也不是没有做，只是很多主题做到一半的时候就没在继续了，总是做着做着就觉得不行了。今天发布这个新主题的DEMO图，已经下...2008-11-10 -- Wopus新主题终于上线了 (9)经过最后一天的努力,WOPUS新主题终于上线.由于时间关系,仍存在很多问题.希望大家能及时反馈发现的问题,以便我们及时修正.谢谢大家的支持!~...2011-08-17 -- Flight主题更新 (19)这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。...<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新主题预览图" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fnew-theme-demo.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196711.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新主题预览图</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="JavaScript实现WordPress自由颜色主题切换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fjavascriptwordpress.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">JavaScript实现WordPress自由颜色主题切换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已。在这段时间里，不是没有做过主题，很多时候，一时有了好想法。就开始写，往往是写了个首页。或头部就又写不下去了。前几天摄神发布了<a href="http://www.prower.cn/work/2097" title="prower v4" target="_blank">prower v4</a>。看到之后，又有冲动了。于是把之前的一款放在那几个月了的主题继续整整。成了现在的<strong>perfct</strong>。</p>
<p><span id="more-903"></span></p>
<p><img src="http://leotheme.cn/wp-content/uploads/2011/09/perfct_demo.jpg" alt="perfct_demo" title="perfct_demo" width="620" height="360" class="alignnone size-full wp-image-904" /></p>
<p><strong>主题说明：</strong></p>
<ul>
<li>自定义菜单，且支持二级下拉菜单；</li>
<li>置顶文章区别显示；</li>
<li>侧边栏小工具(<a href="http://faq.wopus.org/question/1063/" target="_blank">如何添加小工具？</a>)</li>
<li>内容页侧边栏显示同分类下的最新文章；</li>
<li>分类页顶部显示分类名称及描述；(<a href="http://faq.wopus.org/question/1064/" target="_blank">分类描述添加修改</a>)</li>
<li>评论嵌套回复；(<a href="http://faq.wopus.org/question/1062/" target="_blank">如何开启评论的嵌套回复？</a>)</li>
</ul>
<p>此主题没啥特别功能。且不再向IE6兼容。我自己测试了下，有一些小地方不兼容。所以，关于IE6的样式问题，请不要找偶。插件方面浏览次数需要“wp-postviews”支持。没装不会显示。其他的暂无！</p>
<p><strong>后话：</strong><br />
计划在这个基础上作一些丰富的效果扩展。</p>
<ol>
<li>兼容性修复。支持IE系列，firefox,Google Chrome等浏览器</li>
<li>自定义管理工具栏，默认的那个黑条条实在是太纠结了。</li>
<li>弹出层登录，信息提示效果。</li>
<li>缩略图，焦点图等效果。</li>
<li>主题后台功能设置</li>
<li>绑定腾讯微博</li>
<li>Ajax评论</li>
<li>相册，图片缩放等效果</li>
<li>集成表情、头像缓存功能</li>
</ol>
<p>管理工具栏效果：</p>
<p><img src="http://leotheme.cn/wp-content/uploads/2011/09/QQ截图20110831142140.jpg" alt="" title="自定义管理工具栏效果" width="413" height="383" class="alignnone size-full wp-image-906" /></p>
<p>弹出登录效果：</p>
<p><img src="http://leotheme.cn/wp-content/uploads/2011/09/QQ截图20110901141156.jpg" alt="" title="弹出层登录" width="426" height="317" class="alignnone size-full wp-image-907" /></p>
<p>提示信息效果：</p>
<p><img src="http://leotheme.cn/wp-content/uploads/2011/09/QQ截图20110901141312.jpg" alt="" title="提示信息" width="412" height="200" class="alignnone size-full wp-image-908" /></p>
<p>暂时只想到这么多了。反正会慢慢折腾。直到满意为止！</p>
<p>下载地址：<a href='http://leotheme.cn/wp-content/uploads/2011/09/perfct-v1.0.zip'>perfct-v1.0</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新主题预览图" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fnew-theme-demo.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196711.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新主题预览图</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="JavaScript实现WordPress自由颜色主题切换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fjavascriptwordpress.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">JavaScript实现WordPress自由颜色主题切换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2009-06-13 -- <a href="http://leotheme.cn/wordpress/wordpresstheme-dreamy2-0.html" title="主题Dreamy更新到v2.0 [06-18 00:08]">主题Dreamy更新到v2.0 [06-18 00:08]</a> (61)<br /><small>距离这个主题发布上一版已经差不多两个月了，而这个主题我一直在修修改改。虽然很多同学问我要我BLOG用的版本，但很多地方没有完善，所以一直没有发布自己用的版本。但现在好了，终于可以发布这个新的版本了。这...</small></li><li>2009-06-07 -- <a href="http://leotheme.cn/wordpress/berrytimes-themes.html" title="黑莓主题的改版总算完成了">黑莓主题的改版总算完成了</a> (16)<br /><small>这次改版很顺利，也没花多少时间。从设计到完成代码用了两天多时间；之所以这么快是因为主题是基于Dreamy这个主题的；大家可以看得出，有很多地方都相似，但细节方面有不少的修改；不废话了。看下最初的设计稿...</small></li><li>2009-03-31 -- <a href="http://leotheme.cn/wordpress/new-theme-demo.html" title="新主题预览图">新主题预览图</a> (18)<br /><small>自从发布Maxthon v2.0后，已经很久没有出新主题了。其中有太多原因了，其实也不是没有做，只是很多主题做到一半的时候就没在继续了，总是做着做着就觉得不行了。今天发布这个新主题的DEMO图，已经下...</small></li><li>2008-11-10 -- <a href="http://leotheme.cn/diary/wopus-new-themes.html" title="Wopus新主题终于上线了">Wopus新主题终于上线了</a> (9)<br /><small>经过最后一天的努力,WOPUS新主题终于上线.由于时间关系,仍存在很多问题.希望大家能及时反馈发现的问题,以便我们及时修正.谢谢大家的支持!~...</small></li><li>2011-08-17 -- <a href="http://leotheme.cn/wordpress/flight-update.html" title="Flight主题更新">Flight主题更新</a> (19)<br /><small>这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpress-themes-perfct.html/feed</wfw:commentRss>
		<slash:comments>96</slash:comments>
		</item>
		<item>
		<title>Flight主题更新</title>
		<link>http://leotheme.cn/wordpress/flight-update.html</link>
		<comments>http://leotheme.cn/wordpress/flight-update.html#comments</comments>
		<pubDate>Wed, 17 Aug 2011 08:00:59 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[资源分享]]></category>
		<category><![CDATA[Flight]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wptheme]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=883</guid>
		<description><![CDATA[这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。 相关文章2011-09-08 -- jQuery中queue和dequeue的用法 (1)今天在做右下角那个静止的工具栏时遇到了一个问题。鼠标放上去的时候，要让周围的4个按钮按顺序显示出来，移开的时候要按顺序隐藏。左思右想发现用animate的回调函数方式来写比较麻烦。于是百度了下，发现j...2011-09-01 -- WordPress主题：perfct 1.0 (96)已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...2010-11-24 -- JQ弹出层插件(tipsWindow 2.8) (164)已更新为2.7...2010-10-12 -- 分享Flight主题中的焦点图（基于JQ） (22)关于这个焦点图没啥说的了，网上太多了。但自己一直没找到个合适的。现在的这个是Dreamy主题中的升级版，虽然看起来一模一样。其实做了很多扩展，优化了结构和JS部分。可以选择切换方式（左右滚动，上下滚动...2010-10-12 -- jquery ajax方法如load,get等 在Chrome下失效的问题 (4)最近碰到一个问题，发现jquery在chrome 中， ajax的load get等方法完全失效。 代码如下： function getHtml(url,ctner){ //alert(c...<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="分享Flight主题中的焦点图（基于JQ）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fflight-theme-jquery-ifocus.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">分享Flight主题中的焦点图（基于JQ）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新主题预览图" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fnew-theme-demo.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196711.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新主题预览图</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress“主题壁纸”" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fwordpressthemedesk.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197177.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress“主题壁纸”</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="黑莓主题的改版总算完成了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fberrytimes-themes.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196917.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黑莓主题的改版总算完成了</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站<a href="http://themes.wopus.org/wpthemes/wopus-themes/4174.html" title="Flight" target="_blank">下载</a>更新后的版本。也可以通过115网盘<a href="http://115.com/file/dnhyjrog#flight.zip" title="Flight" target="_blank">下载</a>。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="分享Flight主题中的焦点图（基于JQ）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fflight-theme-jquery-ifocus.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">分享Flight主题中的焦点图（基于JQ）</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="新主题预览图" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fnew-theme-demo.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196711.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">新主题预览图</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress“主题壁纸”" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fwordpressthemedesk.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197177.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress“主题壁纸”</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="黑莓主题的改版总算完成了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fberrytimes-themes.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fflight-update.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196917.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黑莓主题的改版总算完成了</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-08 -- <a href="http://leotheme.cn/javascript/jquery%e4%b8%adqueue%e5%92%8cdequeue%e7%9a%84%e7%94%a8%e6%b3%95.html" title="jQuery中queue和dequeue的用法">jQuery中queue和dequeue的用法</a> (1)<br /><small>今天在做右下角那个静止的工具栏时遇到了一个问题。鼠标放上去的时候，要让周围的4个按钮按顺序显示出来，移开的时候要按顺序隐藏。左思右想发现用animate的回调函数方式来写比较麻烦。于是百度了下，发现j...</small></li><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2010-11-24 -- <a href="http://leotheme.cn/javascript/jquery-plugins-tipswindow-2-0.html" title="JQ弹出层插件(tipsWindow 2.8)">JQ弹出层插件(tipsWindow 2.8)</a> (164)<br /><small>已更新为2.7...</small></li><li>2010-10-12 -- <a href="http://leotheme.cn/javascript/flight-theme-jquery-ifocus.html" title="分享Flight主题中的焦点图（基于JQ）">分享Flight主题中的焦点图（基于JQ）</a> (22)<br /><small>关于这个焦点图没啥说的了，网上太多了。但自己一直没找到个合适的。现在的这个是Dreamy主题中的升级版，虽然看起来一模一样。其实做了很多扩展，优化了结构和JS部分。可以选择切换方式（左右滚动，上下滚动...</small></li><li>2010-10-12 -- <a href="http://leotheme.cn/javascript/jquery-ajax-load-get-in-chrome.html" title="jquery ajax方法如load,get等 在Chrome下失效的问题">jquery ajax方法如load,get等 在Chrome下失效的问题</a> (4)<br /><small>最近碰到一个问题，发现jquery在chrome 中， ajax的load get等方法完全失效。 代码如下：


function getHtml(url,ctner){
//alert(c...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/flight-update.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>一个实用的wordpress导航</title>
		<link>http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html</link>
		<comments>http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html#comments</comments>
		<pubDate>Tue, 07 Jun 2011 08:52:18 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP函数摘录]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[next]]></category>
		<category><![CDATA[previous]]></category>
		<category><![CDATA[导航]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=940</guid>
		<description><![CDATA[在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接： previous_post_link()：生成当前文章的前一篇文章链接地址； next_post_link()：生成当前文章的后一篇文章链接地址； 这2个函数是直接生成（即直接Echo）链接地址（包括标题、提示），而如果要返回链接的具体内容，则可用这2个函数： get_previous_post()：返回当前文章的前一篇文章链接地址数组； get_next_post()：返回当前文章的后一篇文章链接地址数组； 返回的数组结构为： tdClass Object ( [ID] => 2763 [post_author] => 1 [post_date] => 2009-06-01 03:40:48 [post_date_gmt] => 2009-05-31 19:40:48 [post_content] => 内容…… [post_title] => [转]SEO方程式让你彻底了解SEO [post_category] => 0 [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => zhuan-seo-fang-cheng-shi-rang-ni-che-di-liao-jie-seo [to_ping] => [pinged] => [post_modified] => [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress分类列表函数:wp_list_categories" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress页面函数：wp_list_pages()" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：</p>
<p>    previous_post_link()：生成当前文章的前一篇文章链接地址；<br />
    next_post_link()：生成当前文章的后一篇文章链接地址；</p>
<p>这2个函数是直接生成（即直接Echo）链接地址（包括标题、提示），而如果要返回链接的具体内容，则可用这2个函数：</p>
<p>    get_previous_post()：返回当前文章的前一篇文章链接地址数组；<br />
    get_next_post()：返回当前文章的后一篇文章链接地址数组；</p>
<p>返回的数组结构为：<br />
<span id="more-940"></span><br />
<coolcode lang="php"><br />
    tdClass Object<br />
    (<br />
    [ID] => 2763<br />
    [post_author] => 1<br />
    [post_date] => 2009-06-01 03:40:48<br />
    [post_date_gmt] => 2009-05-31 19:40:48<br />
    [post_content] => 内容……<br />
    [post_title] => [转]SEO方程式让你彻底了解SEO<br />
    [post_category] => 0<br />
    [post_excerpt] =><br />
    [post_status] => publish<br />
    [comment_status] => open<br />
    [ping_status] => open<br />
    [post_password] =><br />
    [post_name] => zhuan-seo-fang-cheng-shi-rang-ni-che-di-liao-jie-seo<br />
    [to_ping] =><br />
    [pinged] =><br />
    [post_modified] => 2009-06-01 03:40:48<br />
    [post_modified_gmt] => 2009-05-31 19:40:48<br />
    [post_content_filtered] =><br />
    [post_parent] => 0<br />
    [guid] => http://www.paopaoniu.com/?p=2763<br />
    [menu_order] => 0<br />
    [post_type] => post<br />
    [post_mime_type] =><br />
    [comment_count] => 4<br />
    )<br />
<coolcode></p>
<p>利用这几个函数的结合，然后利用类似“递归”的传递算法，则可获得相对于当前文章前、后的N篇文章！</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress分类列表函数:wp_list_categories" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress页面函数：wp_list_pages()" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li><li>2009-07-03 -- <a href="http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html" title="WordPress日期和时间函数：the_time()">WordPress日期和时间函数：the_time()</a> (8)<br /><small>在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决wordpress分页问题</title>
		<link>http://leotheme.cn/wordpress/wordpress-query-post-paged.html</link>
		<comments>http://leotheme.cn/wordpress/wordpress-query-post-paged.html#comments</comments>
		<pubDate>Tue, 07 Jun 2011 01:50:12 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[分页]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=935</guid>
		<description><![CDATA[这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。 query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变量的值，其中包括分页参数。因此问题表现为翻页无效，每一页都是一样的。 解决方法如下： 将以下类似的部分： &#60;?php&#160;if (have_posts()) : ?&#62; &#160; &#160; &#60;?php&#160;query_posts(&#34;category_name=somecat&#34;); ?&#62; &#160; &#160; &#160; &#160; &#60;?php&#160;while (have_posts()) : the_post(); ?&#62;&#160; &#160; 替换为 &#160; &#60;?php&#160;if (have_posts()) : ?&#62; &#160; &#160;&#160; &#60;?php&#160;$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(&#34;category_name=somecat&#38;paged=$paged&#34;); ?&#62; &#160; &#160; &#160; &#160; &#60;?php&#160;while (have_posts()) : the_post(); ?&#62; 主要是加了一个$paged的判断。 相关文章2009-07-07 -- WordPress页面函数：wp_list_pages() (16)模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">wordpress定制首页输出</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。</p>
<p>query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变量的值，其中包括分页参数。因此问题表现为翻页无效，每一页都是一样的。</p>
<p>解决方法如下：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">将以下类似的部分：</span></li>
<li><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">query_posts</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">category_name=somecat</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">while</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">the_post</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; </span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Gray;">替换为</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp;&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$paged</span><span style="color: Gray;"> = </span><span style="color: Olive;">(</span><span style="color: Blue;">get_query_var</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">paged</span><span style="color: #8b0000;">'</span><span style="color: Olive;">))</span><span style="color: Gray;"> ? </span><span style="color: Blue;">get_query_var</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">paged</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> : </span><span style="color: Maroon;">1</span><span style="color: Gray;">; </span><span style="color: Blue;">query_posts</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">category_name=somecat&amp;paged=</span><span style="color: #00008b;">$paged</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">while</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">the_post</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span></li></ol></div>
<p>主要是加了一个$paged的判断。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">wordpress定制首页输出</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-07-03 -- <a href="http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html" title="WordPress日期和时间函数：the_time()">WordPress日期和时间函数：the_time()</a> (8)<br /><small>在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpress-query-post-paged.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress评论表单验证</title>
		<link>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html</link>
		<comments>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 02:50:40 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[前端交互]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[表单]]></category>
		<category><![CDATA[评论]]></category>
		<category><![CDATA[验证]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=772</guid>
		<description><![CDATA[wordpress的评论只是个很简单的表单。WP本身也有一个自身的验证系统。但自带的这个验证是基于后台的验证。当表单不符合规格时跳转到另一个页面。我们需要返回上一页才能继续填写表单。这样对于用户的体验并不友好；所以一个基于前端的验证很需要。大家平时也一定有见过各种各样的表单验证。有些表单的验证很复杂，也很强大。不过WP的验证很简单。只需要验证“昵称”、“E-mail”、和评论就行了。http地址因为不是必须的。所以只需要在用户有输入的情况下判断下地址是否符合正常的格式就行了。来看下这个简单的验证效果： 下面来说说这个简单的表单验证。当然，还是基于jQuery的。 var Msg = new Array( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;用户名不能为空&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;昵称不能少于3个字符&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;E-mail地址不能为空&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;请输入正确的E-Mail地址&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;url地址不正确&#34;, &#160; &#160; &#160; [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fothes%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress模板常用调用函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress模板常用调用函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>wordpress的评论只是个很简单的表单。WP本身也有一个自身的验证系统。但自带的这个验证是基于后台的验证。当表单不符合规格时跳转到另一个页面。我们需要返回上一页才能继续填写表单。这样对于用户的体验并不友好；所以一个基于前端的验证很需要。大家平时也一定有见过各种各样的表单验证。有些表单的验证很复杂，也很强大。不过WP的验证很简单。只需要验证“昵称”、“E-mail”、和评论就行了。http地址因为不是必须的。所以只需要在用户有输入的情况下判断下地址是否符合正常的格式就行了。来看下这个简单的验证效果：<br />
<span id="more-772"></span><br />
<img src="http://leotheme.cn/wp-content/uploads/2009/11/form1.png" alt="form1" title="form1" width="589" height="134" /></p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/11/form2.png" alt="form2" title="form2" width="590" height="137" /></p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/11/form3.png" alt="form3" title="form3" width="588" height="135" /><br />
下面来说说这个简单的表单验证。当然，还是基于jQuery的。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">var</span><span style="color: Gray;"> </span><span style="color: Blue;">Msg</span><span style="color: Gray;"> = </span><span style="color: Green;">new</span><span style="color: Gray;"> </span><span style="color: Teal;">Array</span><span style="color: Olive;">(</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">用户名不能为空</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">昵称不能少于3个字符</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">E-mail地址不能为空</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">请输入正确的E-Mail地址</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">url地址不正确</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">评论内容不能少于5个字符</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">输入正确</span><span style="color: #8b0000;">&quot;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li></ol></div>
<p>首先定义一个提示信息的数组。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#author</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">==</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">0</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;"> &lt; </span><span style="color: Maroon;">3</span><span style="color: Gray;"> </span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">1</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">6</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证昵称：如果用户输入的字符为空，或少于3个。刚显示相应的错误信息，否则显示输入正确。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//验证邮件地址</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#email</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">==</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">2</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">!=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> &amp;&amp; !</span><span style="color: #8b0000;">/</span><span style="color: Red;">^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$</span><span style="color: #8b0000;">/</span><span style="color: Gray;">.</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Olive;">)){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">3</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">6</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证E-mail地址：和验证昵称一样。这里是用正则去匹配地址是否正确；</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//验证url</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">!=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> &amp;&amp; !</span><span style="color: #8b0000;">/</span><span style="color: Red;">^http:</span><span style="color: Navy;">\/\/</span><span style="color: Red;">[A-Za-z0-9]+\.[A-Za-z0-9]+[</span><span style="color: Navy;">\/</span><span style="color: Red;">=\?%\-&amp;_~`@[\]\':+!]*([^&lt;&gt;\&quot;\&quot;])*$</span><span style="color: #8b0000;">/</span><span style="color: Gray;">.</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Olive;">)){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">4</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证url地址，因为这个不是必须的，所以只在有输入的情况下才去判断地址是否正确</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//提交，最终验证</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#submit</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">click</span><span style="color: Olive;">(</span><span style="color: Green;">function</span><span style="color: Olive;">(){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">#commentform :input</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">trigger</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">blur</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">//验证评论内容</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">textarea</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">val</span><span style="color: Olive;">()</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;">|| $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">textarea</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">val</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;"> &lt; </span><span style="color: Maroon;">5</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:评论内容不能为空或少于5个字符!</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">var</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">numError</span><span style="color: Gray;"> = $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">form .onError</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">numError</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:请正确填写表单内容</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Green;">else</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:正在提交评论...</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">.formtips</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">})</span><span style="color: Gray;">;</span></li></ol></div>
<p>最后。绑定事件，然后验证评论内容是否为空或小于5个字符。如果为true则弹出提示层，并阻止表单的提交。否则弹出提示：正在提交评论&#8230;然后清除提示信息；OK，一个基于JQ的简单的表单验证完成了；</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fothes%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress模板常用调用函数" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress模板常用调用函数</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2008-09-15 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodtwo.html" title="jquery基础教程二[伸缩、隔行变色...]">jquery基础教程二[伸缩、隔行变色...]</a> (3)<br /><small>在上一篇介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子
Demo_5：收缩展开功能[如无法运行请多刷新几次或保存到本地运行]

 
 
 
 
可伸缩块 

 
p,d...</small></li><li>2011-09-08 -- <a href="http://leotheme.cn/javascript/jquery%e4%b8%adqueue%e5%92%8cdequeue%e7%9a%84%e7%94%a8%e6%b3%95.html" title="jQuery中queue和dequeue的用法">jQuery中queue和dequeue的用法</a> (1)<br /><small>今天在做右下角那个静止的工具栏时遇到了一个问题。鼠标放上去的时候，要让周围的4个按钮按顺序显示出来，移开的时候要按顺序隐藏。左思右想发现用animate的回调函数方式来写比较麻烦。于是百度了下，发现j...</small></li><li>2011-08-17 -- <a href="http://leotheme.cn/wordpress/flight-update.html" title="Flight主题更新">Flight主题更新</a> (19)<br /><small>这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。...</small></li><li>2010-11-24 -- <a href="http://leotheme.cn/javascript/jquery-plugins-tipswindow-2-0.html" title="JQ弹出层插件(tipsWindow 2.8)">JQ弹出层插件(tipsWindow 2.8)</a> (164)<br /><small>已更新为2.7...</small></li><li>2010-10-12 -- <a href="http://leotheme.cn/javascript/flight-theme-jquery-ifocus.html" title="分享Flight主题中的焦点图（基于JQ）">分享Flight主题中的焦点图（基于JQ）</a> (22)<br /><small>关于这个焦点图没啥说的了，网上太多了。但自己一直没找到个合适的。现在的这个是Dreamy主题中的升级版，虽然看起来一模一样。其实做了很多扩展，优化了结构和JS部分。可以选择切换方式（左右滚动，上下滚动...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>WordPress页面函数：wp_list_pages()</title>
		<link>http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html</link>
		<comments>http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html#comments</comments>
		<pubDate>Mon, 06 Jul 2009 17:09:18 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP函数摘录]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[函数]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=704</guid>
		<description><![CDATA[模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。 用法： &#60;?php wp_list_pages('arguments'); ?&#62; 默认参数设置为： $defaults = array(&#160; &#160; &#160; &#160;&#160; &#160;'depth'&#160; &#160; &#160; &#160;=&#62; 0,&#160; &#160;显示所有页面和子页面（无深度限制） &#160;&#160; &#160;'show_date'&#160; &#160;=&#62; '',&#160; &#160; &#160;不显示创建日期 &#160;&#160; &#160;'date_format' =&#62; get_option('date_format'),&#160; &#160; &#160; &#160;&#160; &#160;'child_of'&#160; &#160; =&#62; 0,&#160; &#160; &#160; 子页面无限制&#160;&#160; &#160;'exclude'&#160; &#160; &#160;=&#62; '',&#160; &#160; 不删除任何页面&#160;&#160; &#160;'title_li'&#160; &#160; =&#62; __('Pages'),&#160; &#160;页面列表的标题为“Pages（页面）” &#160;&#160; &#160;'echo'&#160; &#160; &#160; [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress分类列表函数:wp_list_categories" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="一个实用的wordpress导航" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。<br />
用法：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">arguments</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span></div></div>
<p><span id="more-704"></span><br />
<strong>默认参数设置为：</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: #00008b;">$defaults</span><span style="color: Gray;"> = </span><span style="color: Green;">array</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">depth</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp;=&gt; </span><span style="color: Maroon;">0</span><span style="color: Gray;">,&nbsp; &nbsp;显示所有页面和子页面（无深度限制） <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">show_date</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp;=&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp;不显示创建日期 <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">date_format</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: Blue;">get_option</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">date_format</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">child_of</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; =&gt; </span><span style="color: Maroon;">0</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp; 子页面无限制<br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">exclude</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp;=&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;">,&nbsp; &nbsp; 不删除任何页面<br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">title_li</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; =&gt; </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Pages</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">,&nbsp; &nbsp;页面列表的标题为“</span><span style="color: Blue;">Pages</span><span style="color: Gray;">（页面）” <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">echo</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; =&gt; </span><span style="color: Maroon;">1</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp;回显（显示）结果 <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">authors</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp;=&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp; 不局限于特定作者 <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">sort_column</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: #8b0000;">'</span><span style="color: Red;">menu_order, post_title</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,&nbsp; 先按页面顺序再按页面标题排序 <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">link_before</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">link_after</span><span style="color: #8b0000;">'</span><span style="color: Gray;">&nbsp; =&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;">,&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #8b0000;">'</span><span style="color: Red;">exclude_tree</span><span style="color: #8b0000;">'</span><span style="color: Gray;">=&gt; </span><span style="color: #8b0000;">''</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">;不删除父级/子级树</span></div></div>
<p><strong> 隐藏或改变列表标题</strong></p>
<p>给title_li参数传递一个零值或空值，可以隐藏由wp_list_pages生成的页面列表默认标题。下面的代码可显示所述效果：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; <br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">title_li=</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p>在下面这个例子中，列表中只包含编号为9，5，23的页面，标题内容被改为“Poetry”，格式为< h2 >:</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">include=5,9,23&amp;title_li=&lt;h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Poetry</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p><strong>将页面按页面顺序排列</strong></p>
<p>下面的例子将页面按管理栏中 Write > Page 定义的页面顺序进行排列。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">sort_column=menu_order</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul</span></div></div>
<p>如果希望将列表按页面顺序进行排列并将“Prose”作为列表标题（以h2格式）显示在侧边栏中，可将以下代码添加到sidebar.php文件中：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">sort_column=menu_order&amp;title_li=&lt;h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Prose</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p>使用下列代码段，可显示出无标题并以页面顺序排列的页面：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">sort_column=menu_order&amp;title_li=</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p><strong>将页面按发表日期排列</strong></p>
<p>下列代码显示出的页面将按发表日期进行排列，在页面列表项旁显示日期。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">sort_column=post_date&amp;show_date=created</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p><strong>从列表中排除页面</strong></p>
<p>用exclude参数可隐藏列表中由wp_list_pages生成的若干页面。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">exclude=17,38</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; <br />&lt;/ul&gt;</span></div></div>
<p><strong>显示列表中特定页面</strong></p>
<p>若仅希望在列表中显示特定页面，例如编号为35，7，26和13的页面，可使用include参数。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">include=7,13,26,35&amp;title_li=&lt;h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Pages</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; &nbsp; <br />&lt;/ul&gt;</span></div></div>
<p><strong> 显示子页面</strong></p>
<p>注意：即使没有子页面，HTML标签也是必要的（ul或ol）。用css设置列表时需要将这一点谨记在心。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">title_li=&amp;child_of=</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">ID</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&amp;show_date=modified&nbsp; &nbsp; <br />&nbsp; &amp;date_format=$date_format</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;">&nbsp; &nbsp; <br />&lt;/ul&gt;</span></div></div>
<p>以下代码仅在目前页面有子页面（将目前页面设为父级页面的页面）的情况下生成列表：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: #00008b;">$children</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">title_li=&amp;child_of=</span><span style="color: #8b0000;">'</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">ID</span><span style="color: Gray;">.</span><span style="color: #8b0000;">'</span><span style="color: Red;">&amp;echo=0</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #00008b;">$children</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Black;">&nbsp; &nbsp; <br />&nbsp; &lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: #00008b;">$children</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Black;">&nbsp; &nbsp; <br />&nbsp; &lt;/ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Olive;">}</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<p><strong>在子页面上列出子页面</strong></p>
<p>上述示例都是在父级页面上展示子页面，却没有说明如何在子页面上进行展示。可用下列代码在某一父页面或其中一个子页面上展示子页面。</p>
<p>将本代码放在侧边栏的widget区块后，代码将无法运行。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">post_parent</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: #00008b;">$children</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">title_li=&amp;child_of=</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">post_parent</span><span style="color: Gray;">.</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">&amp;echo=0</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: #00008b;">$children</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">title_li=&amp;child_of=</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">.</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">ID</span><span style="color: Gray;">.</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">&amp;echo=0</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #00008b;">$children</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Black;">&nbsp; &nbsp; <br />&nbsp; &lt;ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: #00008b;">$children</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Black;">&nbsp; &nbsp; <br />&nbsp; &lt;/ul&gt;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Olive;">}</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<p>本代码也可用在sidebar.php中，仅显示顶级页面。但浏览到包含子页面的页面时，仅显示其子页面。</p>
<p>浏览主页时在侧边栏显示所有顶级页面<br />
浏览没有子页面的顶级页面时，显示所有顶级页面<br />
浏览有子页面的顶级页面时，显示所有子页面及下一级页面<br />
浏览子页面时，显示其父级页面下的所有子页面和下一级页面 </p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp; <br /></span><span style="color: #00008b;">$output</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">echo=0&amp;depth=1&amp;title_li=&lt;h2&gt;Top Level Pages &lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; <br /></span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">is_page</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: #00008b;">$page</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">ID</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">post_parent</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #00008b;">$page</span><span style="color: Gray;"> = </span><span style="color: #00008b;">$post</span><span style="color: Gray;">-&gt;</span><span style="color: Blue;">post_parent</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; </span><span style="color: #00008b;">$children</span><span style="color: Gray;">=</span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: #8b0000;">'</span><span style="color: Red;">echo=0&amp;child_of=</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: #00008b;">$page</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&amp;title_li=</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #00008b;">$children</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;</span><span style="color: #00008b;">$output</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_list_pages</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">echo=0&amp;child_of=</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: #00008b;">$page</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&amp;title_li=&lt;h2&gt;Child Pages&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;&nbsp; &nbsp; <br />&nbsp; </span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; <br /></span><span style="color: Olive;">}</span><span style="color: Gray;">&nbsp; <br /></span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: #00008b;">$output</span><span style="color: Gray;">;&nbsp; <br /></span><span style="color: Blue;">?&gt;</span></div></div>
<p><strong>页面选项标记与格式</strong></p>
<p>默认情况下，wp_list_pages( )生成一个嵌套的、由管理栏 Write > Page 生成的无序WordPress页面列表。将title_li参数设为任意空字符后可除去最外围选项（li.pagenav）和列表（ul）。</p>
<p>所有wp_list_pages( )生成的列表项（li）都被标上page_item类。显示页面时将调用wp_list_pages( )，这时该页面的列表项被赋予附加类current_page_item。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"><br />&lt;</span><span style="color: Blue;">li</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">pagenav</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&nbsp; <br /></span><span style="color: Blue;">Pages</span><span style="color: Gray;"> </span><span style="color: Olive;">[</span><span style="color: Blue;">title_li</span><span style="color: Olive;">]</span><span style="color: Gray;">&nbsp; &nbsp; <br />&nbsp; &lt;</span><span style="color: Blue;">ul</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;&lt;!-- </span><span style="color: Blue;">Output</span><span style="color: Gray;"> </span><span style="color: Blue;">starts</span><span style="color: Gray;"> </span><span style="color: Blue;">here</span><span style="color: Gray;"> </span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: #8b0000;">'</span><span style="color: Red;">title_li</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Blue;">parameter</span><span style="color: Gray;"> </span><span style="color: Blue;">is</span><span style="color: Gray;"> </span><span style="color: Green;">empty</span><span style="color: Gray;"> --&gt;&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;&lt;</span><span style="color: Blue;">li</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">page-item-2 page_item current_page_ancestor current_page_parent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp;</span><span style="color: Olive;">[</span><span style="color: Blue;">parent</span><span style="color: Gray;"> </span><span style="color: Blue;">of</span><span style="color: Gray;"> </span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">current</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Olive;">]</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp;&lt;</span><span style="color: Blue;">ul</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;</span><span style="color: Blue;">li</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">page-item-21 page_item current_page_item</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Olive;">[</span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">current</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Olive;">]</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/</span><span style="color: Blue;">li</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp;&lt;/</span><span style="color: Blue;">ul</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;&lt;/</span><span style="color: Blue;">li</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;&lt;</span><span style="color: Blue;">li</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">page-item-3 page_item</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp; &nbsp;</span><span style="color: Olive;">[</span><span style="color: Blue;">another</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Olive;">]</span><span style="color: Gray;">&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; &nbsp;&lt;/</span><span style="color: Blue;">li</span><span style="color: Gray;">&gt;&nbsp; &nbsp; <br />&nbsp; &lt;/</span><span style="color: Blue;">ul</span><span style="color: Gray;">&gt;&nbsp; <br />&lt;/</span><span style="color: Blue;">li</span><span style="color: Gray;">&gt;</span></div></div>
<p>可以用CSS选择器为这些列表项进行样式设计：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">.pagenav</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">outermost</span><span style="color: Gray;"> </span><span style="color: Blue;">list</span><span style="color: Gray;"> </span><span style="color: Blue;">item</span><span style="color: Gray;">; </span><span style="color: Blue;">contains</span><span style="color: Gray;"> </span><span style="color: Blue;">whole</span><span style="color: Gray;"> </span><span style="color: Blue;">list</span><span style="color: Gray;"> </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; <br /></span><span style="color: Blue;">.page-item-2</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">item</span><span style="color: Gray;"> </span><span style="color: Blue;">for</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Gray;"> </span><span style="color: Blue;">ID</span><span style="color: Gray;"> 2 </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; <br /></span><span style="color: Blue;">.page</span><span style="color: Gray;">_</span><span style="color: Blue;">item</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">any</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Gray;"> </span><span style="color: Blue;">item</span><span style="color: Gray;"> </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; <br /></span><span style="color: Blue;">.current</span><span style="color: Gray;">_</span><span style="color: Blue;">page</span><span style="color: Gray;">_</span><span style="color: Blue;">item</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">current</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Gray;"> </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; <br /></span><span style="color: Blue;">.current</span><span style="color: Gray;">_</span><span style="color: Blue;">page</span><span style="color: Gray;">_</span><span style="color: Blue;">parent</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">parent</span><span style="color: Gray;"> </span><span style="color: Blue;">of</span><span style="color: Gray;"> </span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">current</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Gray;"> </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; <br /></span><span style="color: Blue;">.current</span><span style="color: Gray;">_</span><span style="color: Blue;">page</span><span style="color: Gray;">_</span><span style="color: Blue;">ancestor</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"> … </span><span style="color: Olive;">}</span><span style="color: Gray;"> /</span><span style="color: Blue;">*</span><span style="color: Gray;"> </span><span style="color: Blue;">any</span><span style="color: Gray;"> </span><span style="color: Blue;">ancestor</span><span style="color: Gray;"> </span><span style="color: Blue;">of</span><span style="color: Gray;"> </span><span style="color: Blue;">the</span><span style="color: Gray;"> </span><span style="color: Blue;">current</span><span style="color: Gray;"> </span><span style="color: Blue;">Page</span><span style="color: Gray;"> </span><span style="color: Blue;">*</span><span style="color: Gray;">/&nbsp; 参数<br /></span><span style="color: Blue;">sort</span><span style="color: Gray;">_</span><span style="color: Blue;">column</span><span style="color: Gray;"> (字符)</span></div></div>
<p>按不同方式对页面列表进行排序。默认设置成按页面标题的字母顺序排序。</p>
<ul>
<li>&#8216;post_title&#8217; —— 按页面标题的字母顺序排序——默认 </li>
<li>&#8216;menu_order&#8217; —— 按页面顺序（Page Order）进行排序。注意页面顺序和页面编号的区别。页面编号是由WordPress为每篇文章或页面设定的独有的数字，而页面顺序则由用户在管理栏的Write>Pages中设置。</li>
<li>&#8216;post_date&#8217; —— 按页面创建日期排序。 </li>
<li>&#8216;post_modified&#8217; —— 按最后修改时间进行排序。 </li>
<li>&#8216;ID&#8217; —— 按页面序列编号排序。 </li>
<li>&#8216;post_author&#8217; —— 按页面创建者的序列编号排序。 </li>
<li>&#8216;post_name&#8217; —— 按页面缩略名的字母顺序排序。</li>
</ul>
<p>注意：sort_column参数可按WordPress数据库 wp_post table中任意字段的描述符来对页面列表进行排序。下面给出一些实用示例。</p>
<p><strong>sort_order (字符)</strong></p>
<p>更改页面列表的排列顺序（升序或降序）。默认为升序。可能的值为：</p>
<ul>
<li>&#8216;asc&#8217; ——按从低到高顺序排列（默认） </li>
<li>&#8216;desc&#8217; —— 按从高到低顺序排列 </li>
</ul>
<p><strong>exclude (字符)</strong></p>
<p>定义一列页面编号并用逗号隔开，将其从已有列表中删除（例如：&#8217;exclude=3，7，1&#8242;）。无默认值。</p>
<p><strong>exclude_tree (整数)</strong></p>
<p>与&#8217;child_of&#8217;相反，&#8217;exclude_tree&#8217;从结果中移除已知编号的所有子页面。也可用于隐藏已知页面的所有子页面。该参数还可联合&#8217;child_of&#8217; 的值以隐藏孙页面。在2.7版本中该参数可用。</p>
<p><strong>include (字符)</strong></p>
<p>仅包含get_pages生成的特定页面列表。include参数与exclude同样用逗号将页面编号隔开。无默认值。</p>
<p><strong>depth(整数)</strong></p>
<p>该参数决定wp_list_pages生成的列表中包含的页面层次级数。默认值为0（显示子页面内的所有页面）。</p>
<ul>
<li>0 — 以层级方式（缩进）显示所有页面和子页面（默认） </li>
<li>-1 — 以平级方式（不缩进）显示子页面中的页面 </li>
<li>1 — 仅显示最上层页面 </li>
<li>2 — 该值（或更大值）表示需要显示页面内部的层级数 </li>
</ul>
<p><strong>child_of (整数)</strong></p>
<p>仅显示单个页面的子页面；值为默认编号。默认值为0（显示所有页面）。注意child_of参数不仅获取直系子页面，也会从已知编号中获取“孙页面”。默认值为0（显示所有页面）。</p>
<p><strong>show_data(字符)</strong></p>
<p>在每篇页面旁显示创建日期或最新修改日期。默认值为空值（不显示日期）。可用的值包括：</p>
<ul>
<li>&#8216; &#8216; — 不显示日期（默认） </li>
<li>&#8216;modified&#8217; — 显示最新修改日期 </li>
<li>&#8216;xxx&#8217; — 任何非&#8217;modified&#8217;值都将显示页面最初创建的日期（post_date）。参看上文中的示例。</li>
</ul>
<p><strong>date_format(字符)</strong></p>
<p>该参数对show_date参数生成的页面日期格式（”l, F j, Y”）进行设置。默认格式为WordPress选项设定的日期格式。参见日期和时间设置以及php网站上的页面日期格式。</p>
<p><strong>title_li (字符)</strong></p>
<p>设置页面列表标题的内容与样式。默认值为“_（&#8217;页面&#8217;）”，显示结果为“页面”（_(”)用于本地定位）。若传递值为零或为空（”），则不显示标题，列表也不会被ul标签围绕。参见标题示例。</p>
<p><strong>echo (布尔型)</strong></p>
<p>触发显示所生成的链接列表，或将列表按HTML文本格式返回供PHP使用。默认值为1（显示生成的列表项）。可能的值包括：</p>
<ul>
<li>1 (true) — 默认 </li>
<li>0（false） </li>
</ul>
<p><strong>hierarchical（布尔型）</strong><br />
在上级页面列表下以缩进方式显示下级页面。默认值为true（在父级列表项下显示其子页面）。可能的值有：</p>
<ul>
<li>1（true）——默认 </li>
<li>0（false） </li>
</ul>
<p><strong>meta_key（字符）</strong><br />
仅包含含有该自定义字段关键字的页面（与meta_value字段联合使用）。</p>
<p><strong>meta_value（字符）</strong><br />
仅包含含有该自定义字段值的页面（与meta_key字段联合使用）。</p>
<p><strong>link_before（字符）</strong></p>
<p>设置标签< a>中文字链接前的文本或html代码。（适用于2.7.0或更新版本）</p>
<p><strong>link_after（字符）</strong><br />
设置标签< a>中文字链接后的文本或html代码。（适用于2.7.0或更新版本）</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress分类列表函数:wp_list_categories" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress分类列表函数:wp_list_categories</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="一个实用的wordpress导航" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F%25E4%25B8%2580%25E4%25B8%25AA%25E5%25AE%259E%25E7%2594%25A8%25E7%259A%2584wordpress%25E5%25AF%25BC%25E8%2588%25AA.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">一个实用的wordpress导航</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-06-17 -- <a href="http://leotheme.cn/wordpress/5gebuchangyongwordpress-function.html" title="5个不常用的Wordpress函数">5个不常用的Wordpress函数</a> (4)<br /><small>原文：5 Useful WordPress Functions You Didn’t Know Existed
翻译：Epile

在Wordpress的 source code 里有大量实用函...</small></li><li>2008-10-27 -- <a href="http://leotheme.cn/wordpress/wordpresscyfunction.html" title="WordPress模板常用调用函数">WordPress模板常用调用函数</a> (2)<br /><small>虽然都是些基本的东西,但今天想要用的时候却记不了怎么多.没办法,只好百度一下.SO...
在这做下笔记,方便以后查询.
WordPress基本模板文件

一套完整的WordPress模板应至少...</small></li><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordPress日期和时间函数：the_time()</title>
		<link>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html</link>
		<comments>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html#comments</comments>
		<pubDate>Fri, 03 Jul 2009 09:48:09 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP函数摘录]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[参数]]></category>
		<category><![CDATA[时间]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=673</guid>
		<description><![CDATA[在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时间函数时所调用的参数，基于WordPress的博客平台通常会在文章的标题处调用时间函数来显示文章的发表时间。 文章的时间函数为：&#60;?php the_time() ?&#62; 评论的时间函数为：&#60;?php&#160;comment_date() ?&#62; 评论的日期函数为：&#60;?php&#160;comment_time() ?&#62; WordPress的全部时间参数及显示效果： a代表小写的英语的上下午，如am、pm A代表大写的英语的上下午，如AM、PM d代表英语的日期（小于10仍为两位数写法），如05、12 D代表中文的星期，如五、七 F代表中文的月份（包括“月”这个字），如五月、十二月 g代表英语的小时（小于10为一位数写法），如5、12 G代表英语的小时（小于10仍为两位数写法），如05、12 h代表英语的分钟（小于10为一位数写法），如5、12 H代表英语的分钟（小于10仍为两位数写法），如05、12 j代表英语的日期（小于10为一位数写法），如05、12 l代表中文的星期（包括“星期”这两个字），如星期五、星期七 m代表英语的月份（小于10仍为两位数写法），如05、12 M代表英语的月份（以单词的形式显示），如Jun n代表英语的月份（小于10为一位数写法），如5、12 O代表英语的时区，如+0800 r代表完整的日期时间，如Tue, 06 Jun 2006 18:37:11 +0800 S代表日期的序数后缀，如st、th T代表英语的时区（以单词的形式显示），如CST w代表英语的星期，如5、7 W代表周数，如23 y代表两位数年份，如07、08 Y代表四位数年份，如2007、2008 z代表天数，如156 原来模板的发布时间是英文格式，要改成现在这样的中文格式，在模板的Single.php 和Index.php里面相应的把 &#60;?php the_time(’M jS, Y’) ?&#62; 替换为 &#60;?php the_time(Y年n月d日) ?&#62; 相关文章2011-09-01 -- WordPress主题：perfct 1.0 (96)已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...2011-06-07 -- 一个实用的wordpress导航 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在wordpress主题中，有的时候我们会涉及到wordpress时间的格式，每次都去找很麻烦，查了一下WordPress的时间函数，以及调用的时候的时间参数，所谓时间参数，是WordPress应用时间函数时所调用的参数，基于WordPress的博客平台通常会在文章的标题处调用时间函数来显示文章的发表时间。<br />
<span id="more-673"></span></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">文章的时间函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">评论的时间函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">comment_date</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li>
<li><span style="color: Gray;">评论的日期函数为：</span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">comment_time</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></li></ol></div>
<p>WordPress的全部时间参数及显示效果：</p>
<ul>
<li>a代表小写的英语的上下午，如am、pm</li>
<li> A代表大写的英语的上下午，如AM、PM</li>
<li> d代表英语的日期（小于10仍为两位数写法），如05、12</li>
<li> D代表中文的星期，如五、七</li>
<li> F代表中文的月份（包括“月”这个字），如五月、十二月</li>
<li> g代表英语的小时（小于10为一位数写法），如5、12</li>
<li>G代表英语的小时（小于10仍为两位数写法），如05、12</li>
<li> h代表英语的分钟（小于10为一位数写法），如5、12</li>
<li> H代表英语的分钟（小于10仍为两位数写法），如05、12</li>
<li> j代表英语的日期（小于10为一位数写法），如05、12</li>
<li>l代表中文的星期（包括“星期”这两个字），如星期五、星期七</li>
<li> m代表英语的月份（小于10仍为两位数写法），如05、12</li>
<li> M代表英语的月份（以单词的形式显示），如Jun</li>
<li>n代表英语的月份（小于10为一位数写法），如5、12</li>
<li>O代表英语的时区，如+0800</li>
<li>r代表完整的日期时间，如Tue, 06 Jun 2006 18:37:11 +0800</li>
<li> S代表日期的序数后缀，如st、th</li>
<li> T代表英语的时区（以单词的形式显示），如CST</li>
<li>w代表英语的星期，如5、7</li>
<li>W代表周数，如23</li>
<li>y代表两位数年份，如07、08</li>
<li> Y代表四位数年份，如2007、2008</li>
<li> z代表天数，如156</li>
</ul>
<p>原来模板的发布时间是英文格式，要改成现在这样的中文格式，在模板的Single.php 和Index.php里面相应的把
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">(</span><span style="color: Gray;">’</span><span style="color: Blue;">M</span><span style="color: Gray;"> </span><span style="color: Blue;">jS</span><span style="color: Gray;">, </span><span style="color: Blue;">Y</span><span style="color: Gray;">’</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<p>替换为
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">(</span><span style="color: Blue;">Y</span><span style="color: Gray;">年</span><span style="color: Blue;">n</span><span style="color: Gray;">月</span><span style="color: Blue;">d</span><span style="color: Gray;">日</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwordpress-function-time.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wpfunction/wordpress-function-time.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress分类列表函数:wp_list_categories</title>
		<link>http://leotheme.cn/wordpress/wpfunction/wp_list_categories.html</link>
		<comments>http://leotheme.cn/wordpress/wpfunction/wp_list_categories.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 01:32:02 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP函数摘录]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[分类]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=684</guid>
		<description><![CDATA[wordpress的分类函数对于主题作者来说可能并不陌生，因为基本上我们一定会用到这个函数；在 WordPress 中 wp_list_categories 是用来显示所有分类的链接列表，它有两种表示方法：list_cats()(deprecated) 和 wp_list_cats()(deprecated)，下面是使用方法： &#60;?php wp_list_categories('参数'); ?&#62; 默认参数设置为： $defaults = array('show_option_all' =&#62; &#34;,&#160; 无链接的分类'orderby' =&#62; 'name',&#160; 按照分类名排序'order'=&#62; 'ASC',&#160; 升序'show_last_update' =&#62; 0,&#160; &#160;不显示分类中日志的最新时间戳'style' =&#62; 'list',&#160; 用列表显示分类'show_count' =&#62; 0, 0, 不显示分类下的日志数'hide_empty' =&#62; 1, Displays only Categories with posts'use_desc_for_title' =&#62; 1,&#160; 显示分类链接中 title 标签的分类描述'child_of' =&#62; 0,&#160; 子分类无限制'feed' =&#62; ”,&#160; 无 feed'feed_image' =&#62; ”,&#160; 无 feed [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress页面函数：wp_list_pages()" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>wordpress的分类函数对于主题作者来说可能并不陌生，因为基本上我们一定会用到这个函数；在 WordPress 中 wp_list_categories 是用来显示所有分类的链接列表，它有两种表示方法：list_cats()(deprecated) 和 wp_list_cats()(deprecated)，下面是使用方法：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">参数</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span></div></div>
<p><span id="more-684"></span></p>
<p><strong>默认参数设置为：</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: #00008b;">$defaults</span><span style="color: Gray;"> = </span><span style="color: Green;">array</span><span style="color: Olive;">(</span><span style="color: Gray;"><br /></span><span style="color: #8b0000;">'</span><span style="color: Red;">show_option_all</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> =&gt; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">,&nbsp; 无链接的分类<br />'orderby' =&gt; 'name',&nbsp; 按照分类名排序<br />'order'=&gt; 'ASC',&nbsp; 升序<br />'show_last_update' =&gt; 0,&nbsp; &nbsp;不显示分类中日志的最新时间戳<br />'style' =&gt; 'list',&nbsp; 用列表显示分类<br />'show_count' =&gt; 0, 0, 不显示分类下的日志数<br />'hide_empty' =&gt; 1, Displays only Categories with posts<br />'use_desc_for_title' =&gt; 1,&nbsp; 显示分类链接中 title 标签的分类描述<br />'child_of' =&gt; 0,&nbsp; 子分类无限制<br />'feed' =&gt; ”,&nbsp; 无 feed<br />'feed_image' =&gt; ”,&nbsp; 无 feed 图片显示<br />'exclude' =&gt; ”,&nbsp; 不在分类列表中显示该分类<br />'hierarchical' =&gt; true,&nbsp; 分层显示父/子分类<br />'title_li' =&gt; __('Categories'),&nbsp; 在列表前作为标题显示分类<br />'echo' =&gt; 1 显示分类<br />);<br />?&gt;</span></div></div>
<p><strong>用法举例：</strong></p>
<p>1、按照字母排序，并只显示 ID 为16、3、9和5的分类：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">orderby=name&amp;include=3,5,9,16</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>2、按照字母排序，显示每个分类的日志数，但不显示 ID 为10的分类</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">orderby=name&amp;show_count=1&amp;exclude=10</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>3、显示或隐藏列表头，在分类函数 wp_list_categories 中，title_li 这个参数用于设置或者隐藏分类列表的头或者标题。它的默认值是：‘(__(’Categories’)’ ，这也就是为什么我们在不另设置分类列表标题的时候，它会显示“Categories”的原因。如果你在这里不设置任何参数，那么它将什么都不会显示。下面的例子是排除 ID 为4和7并且隐藏列表头的分类列表：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">exclude=4,7&amp;title_li=</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>接下来的例子是仅仅只显示 ID为5、9和23，并且列表头显示为“诗歌”的分类列表：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">include=5,9,23&amp;title_li=&lt;h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> . </span><span style="color: Blue;">__</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">诗歌</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/h2&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;"> </span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>4、仅显示某个分类下的子分类，下面的示例代码生成了 ID 为8的父分类下的子分类根据其 ID 进行排序的链接列表（读起来真绕口 -__-|||），它会显示每个分类下的文章数，并且隐藏链接的 title 标签中的分类描述，注意：如果父分类下没有任何文章，那么父分类将不会显示</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">orderby=id&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=8</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>这个函数里设置的参数比较多，这里我稍作说明：我们可以看到不同参数之间使用了“&#038;”这个“与符号”来进行区分连接，orderby=id 按照 ID 排序，show_count=1 显示分类下的文章数，use_desc_for_title=0 隐藏分类描述，child_of=8 指定 ID 为8的子分类。</p>
<p>5、显示带有 RSS Feed 链接的分类列表，下面代码根据分类名对分类列表排序，并显示每个分类下的文章数和 RSS 的 Feed 链接。</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">orderby=name&amp;show_count=1&amp;feed=RSS</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>还可以使用 RSS 图标代替 RSS 链接</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Gray;">&lt;ul&gt;<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">orderby=name&amp;show_count=1&amp;feed_image=/images/rss.gif</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"><br />&lt;/ul&gt;</span></div></div>
<p>6、标记和样式化分类列表，从上面的例子中可以看到，我们将分类列表函数： wp_list_categories() 套用在 ul 和 li 标签里，除此外我们还可以对其进行其它的样式化，个人认为这些工作直接在 CSS 里设置即可，原文档中的方法实际作用并不是很大，这里我就不多做介绍，有兴趣的朋友可以<a href="http://codex.wordpress.org/Template_Tags/wp_list_categories#Markup_and_Styling_of_Category_Lists"> 参考这里</a></p>
<p>介绍这个函数中所用到的各种参数设置。</p>
<p>orderby<br />
字符串型参数，分类的排序方式： </p>
<p>orderby=ID （按照分类默认的 ID 排序）<br />
orderby=name （按照分类名排序，默认方式）<br />
orderby=count （按照分类下的文章数排序）<br />
order<br />
字符串型，分类按照升降序排序： </p>
<p>order=ASC （默认的升序排列）<br />
order=DESC （降序排列）<br />
show_last_updated<br />
布尔型，用于是否显示最近更新的时间戳： </p>
<p>show_last_updated=1 （显示）<br />
show_last_updated=0 （默认，不显示）<br />
style<br />
字符串型，控制分类的输出方式： </p>
<p>style=list （按照列表的样式输出）<br />
style=none （无样式输出）<br />
show_count<br />
布尔型，是否显示每个分类下的文章数： </p>
<p>show_count=0 （默认不显示）<br />
show_count=1 （显示）<br />
hide_empty<br />
布尔型，是否不显示没有文章的分类： </p>
<p>hide_empty=1 （默认，是的，不显示）<br />
hide_empty=0 （显示）<br />
use_desc_for_title<br />
布尔型，是否将分类的描述插入其链接的 title 标签中： </p>
<p>use_desc_for_title=1 （默认，插入描述）<br />
use_desc_for_title=0 （不插入）<br />
child_of<br />
整型，显示指定父分类 ID 下的子分类，无默认值<br />
feed<br />
字符串型，显示每个分类的 RSS 链接，并可以设置链接的文字，默认不显示<br />
feed_image<br />
字符串型，为 RSS 设置一个链接的图标，默认不显示<br />
exclude<br />
字符串型，根据分类的 ID，按照升序将指定分类从分类列表中排除<br />
include<br />
字符串型，根据分类的 ID，按照升序，将指定分类显示出来<br />
hierarchical<br />
布尔型，是否分层缩进显示子分类 </p>
<p>hierarchical=1 （默认显示）<br />
hierarchical=0 （不显示）<br />
hierarchical<br />
字符串型，设置分类的标题名和外部列表项目的样式，默认显示“_Categories”，如果没有设置这个值则不显示<br />
number<br />
整型，设置显示分类的数量，默认没有限制。<br />
echo（含糊不清…）<br />
布尔型，用于显示结果或保持为一个变量，默认显示原有分类。 </p>
<p>echo=1 （默认显示）<br />
echo=0 （不显示）<br />
depth（用处不大）<br />
整型，用于控制最多显示多少层的子分类。 </p>
<p>depth=0 （默认按照分层缩进的方式显示全部分类和子分类）<br />
depth=-1 （不按照缩进的方式显示全部分类）<br />
depth=1 （只显示一层子分类）<br />
depth=n （显示 n 层子分类） </p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress页面函数：wp_list_pages()" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_pages.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress页面函数：wp_list_pages()</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwpfunction%2Fwp_list_categories.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wpfunction/wp_list_categories.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>5个不常用的WordPress函数</title>
		<link>http://leotheme.cn/wordpress/5gebuchangyongwordpress-function.html</link>
		<comments>http://leotheme.cn/wordpress/5gebuchangyongwordpress-function.html#comments</comments>
		<pubDate>Wed, 17 Jun 2009 06:31:57 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[函数]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=651</guid>
		<description><![CDATA[原文：5 Useful WordPress Functions You Didn’t Know Existed 翻译：Epile 在Wordpress的 source code 里有大量实用函数可供你在主题和插件中使用。但是，有很多人并不知道它的存在，可能因为 the Codex 极度不完善，许多人讨厌看源代码。幸运的是，阅读Wordpress源代码是我的爱好。 所以，我编制了一份我收藏的函数名单。 有一些很简单，几乎每一个人都会实用；而另一些不太常用；但是这些都是非常实用的。 1. wp_mail() wp_mail()基本上是一个超级简单的函数，允许你通过一些简单的代码轻松地向任何人发送电子邮件。例如： &#60;?php$to = ‘user@example.com’;$subject = ‘Hello from my blog!’;$message = ‘Check it out — my blog is emailing you!’&#160;$mail = wp_mail($to, $subject, $message);&#160;if($mail) echo ‘Your message has been sent!’;else echo ‘There was a problem sending your message. [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>原文：<a href="http://www.nathanrice.net/blog/5-useful-wordpress-functions-you-didnt-know-existed/">5 Useful WordPress Functions You Didn’t Know Existed</a><br />
翻译：<a href="http://epile.cn/blog/">Epile</a></p>
<p>在Wordpress的 <a href="http://phpxref.com/xref/wordpress/nav.html?index.html">source code</a> 里有大量实用函数可供你在主题和插件中使用。但是，有很多人并不知道它的存在，可能因为 <a href="http://codex.wordpress.org/">the Codex</a> 极度不完善，许多人讨厌看源代码。幸运的是，阅读Wordpress源代码是我的爱好。</p>
<p>所以，我编制了一份我收藏的函数名单。<br />
<span id="more-651"></span><br />
有一些很简单，几乎每一个人都会实用；而另一些不太常用；但是这些都是非常实用的。</p>
<h4>1. wp_mail()</h4>
<p><strong>wp_mail()</strong>基本上是一个超级简单的函数，允许你通过一些简单的代码轻松地向任何人发送电子邮件。例如：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"><br /></span><span style="color: #00008b;">$to</span><span style="color: Gray;"> = ‘</span><span style="color: Blue;">user</span><span style="color: Gray;">@</span><span style="color: Blue;">example</span><span style="color: Gray;">.</span><span style="color: Blue;">com</span><span style="color: Gray;">’;<br /></span><span style="color: #00008b;">$subject</span><span style="color: Gray;"> = ‘</span><span style="color: Blue;">Hello</span><span style="color: Gray;"> </span><span style="color: Blue;">from</span><span style="color: Gray;"> </span><span style="color: Blue;">my</span><span style="color: Gray;"> </span><span style="color: Blue;">blog</span><span style="color: Gray;">!’;<br /></span><span style="color: #00008b;">$message</span><span style="color: Gray;"> = ‘</span><span style="color: Blue;">Check</span><span style="color: Gray;"> </span><span style="color: Blue;">it</span><span style="color: Gray;"> </span><span style="color: Blue;">out</span><span style="color: Gray;"> — </span><span style="color: Blue;">my</span><span style="color: Gray;"> </span><span style="color: Blue;">blog</span><span style="color: Gray;"> </span><span style="color: Blue;">is</span><span style="color: Gray;"> </span><span style="color: Blue;">emailing</span><span style="color: Gray;"> </span><span style="color: Blue;">you</span><span style="color: Gray;">!’<br />&nbsp;<br /></span><span style="color: #00008b;">$mail</span><span style="color: Gray;"> = </span><span style="color: Blue;">wp_mail</span><span style="color: Olive;">(</span><span style="color: #00008b;">$to</span><span style="color: Gray;">, </span><span style="color: #00008b;">$subject</span><span style="color: Gray;">, </span><span style="color: #00008b;">$message</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: #00008b;">$mail</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> ‘</span><span style="color: Blue;">Your</span><span style="color: Gray;"> </span><span style="color: Blue;">message</span><span style="color: Gray;"> </span><span style="color: Blue;">has</span><span style="color: Gray;"> </span><span style="color: Blue;">been</span><span style="color: Gray;"> </span><span style="color: Blue;">sent</span><span style="color: Gray;">!’;<br /></span><span style="color: Green;">else</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> ‘</span><span style="color: Blue;">There</span><span style="color: Gray;"> </span><span style="color: Blue;">was</span><span style="color: Gray;"> </span><span style="color: Blue;">a</span><span style="color: Gray;"> </span><span style="color: Blue;">problem</span><span style="color: Gray;"> </span><span style="color: Blue;">sending</span><span style="color: Gray;"> </span><span style="color: Blue;">your</span><span style="color: Gray;"> </span><span style="color: Blue;">message</span><span style="color: Gray;">. </span><span style="color: Blue;">Please</span><span style="color: Gray;"> </span><span style="color: Green;">try</span><span style="color: Gray;"> </span><span style="color: Blue;">again</span><span style="color: Gray;">.’;<br /></span><span style="color: Blue;">?&gt;</span></div></div>
<p>你可以指定第三和第四个参数，<strong>$headers</strong> 和 <strong>$attachments</strong>。这个函数能够完成任何你所能想到的繁重任务。</p>
<p>你可以查看函数参考<a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/wp_mail" target="_blank">via</a>，或者查看函数源代码<a rel="external nofollow" href="http://phpxref.com/xref/wordpress/wp-includes/pluggable.php.source.html#l222" target="_blank">via</a>（强烈建议）。</p>
<h4>2. wp_loginout()</h4>
<p>这个函数使我们能够在主题中显示“登录”链接，所以我们可以轻易的登录，而无须手动输入/wp-admin/ 或/wp-login.php 链接。但是，它不仅仅如此，如果我们已经登录，它将显示“注销”链接而不再是“登录”链接，而使我们无需访问控制台就能够登出账户。</p>
<p>这个函数对于主题作者非常有用，因为它为你建立了所有的逻辑。如果你仍然手动添加登录或注销，你只是在浪费时间。不要瞎忙，使用<strong>wp_loginout()</strong>。</p>
<p>你可以查看模板标签参考<a rel="external nofollow" href="http://codex.wordpress.org/Template_Tags/wp_loginout" target="_blank">via</a>，或者查看函数源代码<a rel="external nofollow" href="http://phpxref.com/xref/wordpress/wp-includes/general-template.php.source.html#l121" target="_blank">via</a>。</p>
<h4>3. clean_url()</h4>
<p>这个函数输入URL并测试它的结构是否正确。如果链接前面缺少http://它可以自动添加，转换符号为正确的HTML，和其他措施用来解决结构不良的网址。</p>
<p>有用的情况还有很多，一个我认为有用的是在主题或插件的设置页面，可以不必要求用户输入的链接必须包括http://。如果这个函数没有其他的作用，那对于我来说这一作用就是有用的。</p>
<p>你可以查看模板标签参考<a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/clean_url" target="_blank">via</a>，或者查看函数源代码<a rel="external nofollow" href="http://phpxref.com/xref/wordpress/wp-includes/general-template.php.source.html#l121" target="_blank">via</a>。</p>
<h4>4. wpautop()</h4>
<p>这个函数用来转换换行符字符串为&lt;br /&gt;标记，并把双换行符作为一个新的段落的开始，在前一段加入&lt;/p&gt;，并在新的段落加上&lt;p&gt;。它还负责关闭段落标签，所以格式都是正确的。</p>
<p>如果你曾经储存了字符串文字在数据库中，现在你需要在网站前端（页面）展示这些内容。但是你想知道如何把这些换行符输出为有效的Html，这个函数就实现这样的功能。事实上，这个函数在输出t<strong>he_content()</strong>时用来格式化帖子的。</p>
<p>你可以查看模板标签参考<a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/wpautop" target="_blank">via</a>，或者查看函数源代码<a rel="external nofollow" href="http://phpxref.com/xref/wordpress/wp-includes/formatting.php.source.html#l102" target="_blank">via</a>。</p>
<h4>5. wp_rss() / get_rss()</h4>
<p>这个函数可以从一个RSS Feed中抽取数据，通过你的处理，显示为链接列表。</p>
<p>我在很多个客户的网站上使用了这个函数，他们需要我在网站的上显示来源于其他网站的故事。所有你需要做的是提供一个RSS Feed地址，函数将帮你完成这些困难的工作。</p>
<p>前提条件是在你使用这些函数前必须包含这些PHP代码，它仅仅只是额外的一行代码：</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"><br /></span><span style="color: Green;">include_once</span><span style="color: Olive;">(</span><span style="color: Blue;">ABSPATH</span><span style="color: Gray;"> . </span><span style="color: Blue;">WPINC</span><span style="color: Gray;"> . ‘/</span><span style="color: Blue;">rss</span><span style="color: Gray;">.</span><span style="color: Blue;">php</span><span style="color: Gray;">’</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: #ffa500;">// &amp;lt; — this is the include call</span><span style="color: Gray;"><br /></span><span style="color: Blue;">wp_rss</span><span style="color: Olive;">(</span><span style="color: Gray;">’</span><span style="color: Blue;">http</span><span style="color: Gray;">:</span><span style="color: #ffa500;">//example.com/rss/feed/goes/here’, 5); // &amp;lt;– this is the function</span><span style="color: Gray;"><br />?&gt;</span></div></div>
<p>你可以查看模板标签参考<strong> wp_rss()</strong> <a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/wp_rss" target="_blank">via</a> 或<strong>get_rss()</strong> <a rel="external nofollow" href="http://codex.wordpress.org/Function_Reference/get_rss" target="_blank">via</a>，或者查看函数源代码<a rel="external nofollow" href="http://phpxref.com/xref/wordpress/wp-includes/rss.php.source.html#l875" target="_blank">via</a>。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress评论表单验证" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196493.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress评论表单验证</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2F5gebuchangyongwordpress-function.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li><li>2008-10-27 -- <a href="http://leotheme.cn/wordpress/wordpresscyfunction.html" title="WordPress模板常用调用函数">WordPress模板常用调用函数</a> (2)<br /><small>虽然都是些基本的东西,但今天想要用的时候却记不了怎么多.没办法,只好百度一下.SO...
在这做下笔记,方便以后查询.
WordPress基本模板文件

一套完整的WordPress模板应至少...</small></li><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/5gebuchangyongwordpress-function.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>主题Dreamy更新到v2.0 [06-18 00:08]</title>
		<link>http://leotheme.cn/wordpress/wordpresstheme-dreamy2-0.html</link>
		<comments>http://leotheme.cn/wordpress/wordpresstheme-dreamy2-0.html#comments</comments>
		<pubDate>Sat, 13 Jun 2009 06:00:14 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[Dreamy2.0]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[wp主题]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=559</guid>
		<description><![CDATA[距离这个主题发布上一版已经差不多两个月了，而这个主题我一直在修修改改。虽然很多同学问我要我BLOG用的版本，但很多地方没有完善，所以一直没有发布自己用的版本。但现在好了，终于可以发布这个新的版本了。这个版本相比第一版并没有做大的修改。只是在细节上做了修改而已，并且添加了一个热门文章展示。 收到了一些问题反馈，目前已修复。下载包已更新，请重新下载。抱歉！ 刚发现一个新的问题，post_views更新到最新版1.50后，热门文章的内容不会显示。我已经对比过1.50和1.40两个版本的代码。导致这个原因在于代码的第486行和490行；我已修过改过代码。修改后的插件也一起打包在主题里了。 Dreamy 2.0相关信息： 1. 仍然支持Widgets； 2. 热门文章模块与文章浏览次数需要插件（post_views）支持，如果没有安装该插件，在header会有个提示信息；当然，这并不会影响整个主题的使用。但在这里还是建议大家装上该插件; 3. 文章左边的图片是自定义自段实现，在发布文章的时候有个名为“entryImg”的自定认自段，值为你要放的图片的路径。没有值得时候会显示默认的图片； 4. 侧边栏的模块做了一些判断，比如那个博客信息在只首页和page页显示的，其他的请自己定义，这样省去了定义多个侧边栏； 5. 侧边栏的评论模块支持wp-recentcomments插件，当然没有装该插件的时候会显示默认的，建议少装点插件，默认的插件这个没有翻页功能。默认显示10条最新的评论； 6. 单篇日志的相关文章需要插件wordpress-23-related-posts-plugin支持，没有装不影响使用； 7. 分页插件的样式已经写在主题的style.css里面，所以请把该插件样式里的内容删除，不然将显示为插件定义的样式； 好像说的太多了，看着有点复杂，不知道大家能不能理解，不过其实一点都不复杂，你可以直接上传主题启用就行，不装任何插件也不会影响主题的正常使用；但要实现和我BLOG一样的效果，是需要装一些插件的。所以建议装这三个插件 [ pagenavi，post_views，wordpress-23-related-posts-plugin ]。这些插件我会一起放在主题包里；大家解压上传并到后台激活就行； 最后来说下post_views这个插件，只所以放到这里，是因为这个有点复杂；因为如果要实现和BLOG的热门文章是需要对这个插件做一些设置的。 安装完该插件后，在后台的设置里点击Postviews进入插件设置界面。首先是基本设置，显示文章浏览次数（看下面图片）: 重点是热门文章的设置（Most Viewed Template）。直接贴代码了，把代码复制到这个框里就行了。 &#60;div&#160;class=&#34;panel&#34;&#62; &#60;div&#160;class=&#34;wrapper&#34;&#62; &#60;h2&#62;&#60;a&#160;href=&#34;%POST_URL%&#34;&#160; title=&#34;%POST_TITLE%&#34;&#62;%POST_TITLE%&#60;/a&#62;&#60;span class=&#34;hotViews&#34;&#62;已浏览 &#60;span class=&#34;light&#34;&#62;%VIEW_COUNT%&#60;/span&#62; 次&#60;/span&#62;&#60;/h2&#62; &#60;span&#160;class=&#34;clear&#34;&#62;&#60;/span&#62; &#60;p&#160;class=&#34;mostContent&#34;&#62;%POST_EXCERPT% &#60;a href=&#34;%POST_URL%&#34;&#62;&#38;raquo;阅读全文&#60;/a&#62;&#60;/p&#62; &#60;/div&#62; &#60;/div&#62; 最后更新：[2009-06-18 00：24] 1. 去掉了所有的广告，如有需要请自行添加； 2. 修复了单篇日志图片超出宽度的问题； 3. 修改了热门日志的JS兼容问题； 4. 其他一些细节修改； 谢谢大家的反馈信息&#8230; 下载地址：http://leotheme.cn/wp-content/uploads/theme/Dreamy v2.0.rar [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Wondershare Flash SlideShow Builder v4.6.0 绿色版" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fwondershare-flash-slideshow-builder-v460-green.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197139.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wondershare Flash SlideShow Builder v4.6.0 绿色版</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="黑莓主题的改版总算完成了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fberrytimes-themes.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196917.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黑莓主题的改版总算完成了</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>距离这个主题发布上一版已经差不多两个月了，而这个主题我一直在修修改改。虽然很多同学问我要我BLOG用的版本，但很多地方没有完善，所以一直没有发布自己用的版本。但现在好了，终于可以发布这个新的版本了。这个版本相比第一版并没有做大的修改。只是在细节上做了修改而已，并且添加了一个热门文章展示。<br />
<span class="light">收到了一些问题反馈，目前已修复。下载包已更新，请重新下载。抱歉！</span><br />
<span id="more-559"></span><br />
<span class="light">刚发现一个新的问题，post_views更新到最新版1.50后，热门文章的内容不会显示。我已经对比过1.50和1.40两个版本的代码。导致这个原因在于代码的第486行和490行；我已修过改过代码。修改后的插件也一起打包在主题里了。</span></p>
<p><strong>Dreamy 2.0相关信息：</strong></p>
<blockquote><p>
1. 仍然支持Widgets；</p>
<p>2. 热门文章模块与文章浏览次数需要插件（post_views）支持，如果没有安装该插件，在header会有个提示信息；当然，这并不会影响整个主题的使用。但在这里还是建议大家装上该插件;</p>
<p>3. 文章左边的图片是自定义自段实现，在发布文章的时候有个名为“entryImg”的自定认自段，值为你要放的图片的路径。没有值得时候会显示默认的图片；</p>
<p>4. 侧边栏的模块做了一些判断，比如那个博客信息在只首页和page页显示的，其他的请自己定义，这样省去了定义多个侧边栏；</p>
<p>5. 侧边栏的评论模块支持wp-recentcomments插件，当然没有装该插件的时候会显示默认的，建议少装点插件，默认的插件这个没有翻页功能。默认显示10条最新的评论；</p>
<p>6. 单篇日志的相关文章需要插件wordpress-23-related-posts-plugin支持，没有装不影响使用；</p>
<p>7. 分页插件的样式已经写在主题的style.css里面，所以请把该插件样式里的内容删除，不然将显示为插件定义的样式；</p></blockquote>
<p>好像说的太多了，看着有点复杂，不知道大家能不能理解，不过其实一点都不复杂，你可以直接上传主题启用就行，不装任何插件也不会影响主题的正常使用；但要实现和我BLOG一样的效果，是需要装一些插件的。所以建议装这三个插件 [ pagenavi，post_views，wordpress-23-related-posts-plugin ]。这些插件我会一起放在主题包里；大家解压上传并到后台激活就行；</p>
<p>最后来说下post_views这个插件，只所以放到这里，是因为这个有点复杂；因为如果要实现和BLOG的热门文章是需要对这个插件做一些设置的。</p>
<p>安装完该插件后，在后台的设置里点击Postviews进入插件设置界面。首先是基本设置，显示文章浏览次数（看下面图片）:</p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/06/postviews_views.jpg" alt="postviews_views" title="postviews_views" width="492" height="123" class="alignnone size-full wp-image-560" /></p>
<p>重点是热门文章的设置（Most Viewed Template）。直接贴代码了，把代码复制到这个框里就行了。</p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/06/postviews_hot.jpg" alt="postviews_hot" title="postviews_hot" width="565" height="190" class="alignnone size-full wp-image-561" /></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Gray;">&lt;</span><span style="color: Blue;">div</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">panel</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;</span><span style="color: Blue;">div</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">wrapper</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;</span><span style="color: Blue;">h2</span><span style="color: Gray;">&gt;&lt;</span><span style="color: Blue;">a</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">%POST_URL%</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&nbsp; </span><span style="color: Blue;">title</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">%POST_TITLE%</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;%</span><span style="color: Blue;">POST_TITLE</span><span style="color: Gray;">%&lt;/</span><span style="color: Blue;">a</span><span style="color: Gray;">&gt;&lt;</span><span style="color: Blue;">span</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">hotViews</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;已浏览 &lt;</span><span style="color: Blue;">span</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">light</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;%</span><span style="color: Blue;">VIEW_COUNT</span><span style="color: Gray;">%&lt;/</span><span style="color: Blue;">span</span><span style="color: Gray;">&gt; 次&lt;/</span><span style="color: Blue;">span</span><span style="color: Gray;">&gt;&lt;/</span><span style="color: Blue;">h2</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;</span><span style="color: Blue;">span</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">clear</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&lt;/</span><span style="color: Blue;">span</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;</span><span style="color: Blue;">p</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">class</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">mostContent</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;%</span><span style="color: Blue;">POST_EXCERPT</span><span style="color: Gray;">% &lt;</span><span style="color: Blue;">a</span><span style="color: Gray;"> </span><span style="color: Blue;">href</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">%POST_URL%</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">&gt;&amp;</span><span style="color: Blue;">raquo</span><span style="color: Gray;">;阅读全文&lt;/</span><span style="color: Blue;">a</span><span style="color: Gray;">&gt;&lt;/</span><span style="color: Blue;">p</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;/</span><span style="color: Blue;">div</span><span style="color: Gray;">&gt;</span></li>
<li><span style="color: Gray;">&lt;/</span><span style="color: Blue;">div</span><span style="color: Gray;">&gt;</span></li>
</ol></div>
<p><strong>最后更新：[2009-06-18 00：24]</strong></p>
<blockquote><p>
1. 去掉了所有的广告，如有需要请自行添加；</p>
<p>2. 修复了单篇日志图片超出宽度的问题；</p>
<p>3. 修改了热门日志的JS兼容问题；</p>
<p>4. 其他一些细节修改；</p></blockquote>
<p>谢谢大家的反馈信息&#8230;</p>
<p>下载地址：<a href="http://leotheme.cn/wp-content/uploads/theme/Dreamy v2.0.rar">http://leotheme.cn/wp-content/uploads/theme/Dreamy v2.0.rar</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Wondershare Flash SlideShow Builder v4.6.0 绿色版" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fshare%2Fwondershare-flash-slideshow-builder-v460-green.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197139.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wondershare Flash SlideShow Builder v4.6.0 绿色版</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="黑莓主题的改版总算完成了" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fberrytimes-themes.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresstheme-dreamy2-0.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6196917.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">黑莓主题的改版总算完成了</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-08-17 -- <a href="http://leotheme.cn/wordpress/flight-update.html" title="Flight主题更新">Flight主题更新</a> (19)<br /><small>这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpresstheme-dreamy2-0.html/feed</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
	</channel>
</rss>

