<?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>╭╰Original　Colors╯╮ - 认真工作 &#187; ┨Skill</title>
	<atom:link href="http://www.iros.me/category/woooordpress/skill/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iros.me</link>
	<description>show the colorsssssss in my WORK</description>
	<lastBuildDate>Fri, 09 Sep 2011 06:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>换了新的域名~~ iros.me，然后Linux+Apach+WordPress的301域名重定向，记录一下~~</title>
		<link>http://www.iros.me/301-redirect-seo.html</link>
		<comments>http://www.iros.me/301-redirect-seo.html#comments</comments>
		<pubDate>Fri, 09 Sep 2011 06:29:08 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[htacess]]></category>
		<category><![CDATA[域名]]></category>
		<category><![CDATA[重定向]]></category>

		<guid isPermaLink="false">http://www.iros.me/?p=809</guid>
		<description><![CDATA[originalcolors.cn 08年注册的域名，当时还真没去想长短问题&#124;&#124;&#124; 曾经被人说“如果不添加上链接让我点，我绝对懒得去输入的喂！~”，不过，确实是很喜欢的一首歌的名字，也就这么久的用着了~~ 不过，CN域名不但被人BS还日子越来越不好过。。。于是想着，还是想想换吧。新域名 iros.me ，其实意思和以前一样的，哈哈，换了一国语言而已~~ 到手3个月了因为懒得做设置一直闲着没用，因为我暂时想两个域名一起指向我的work网站，原来的域名毕竟有被搜索引擎收录，从原网站地址进入能直接跳到新网站相应页面就好了，前面没搞清楚原理瞎折腾老是不能正常访问，原来只要做301的重定向设置就好了，尤其，你如果用 wordpress，并且是Linux服务器主机，apach就方便老多啦~~ 其他情况可以看 这里 的说明 在旧的网站根目录下，修改.htaccess文件就可以咯~~ 加上下面几行代码，一切就搞定！~ 当然，因为2个域名下的目录文件记得保持一致~ Options +FollowSymLinks RewriteEngine on RewriteRule (.*) www.iros.me/$1 [R=301,L] Options +FollowSymLinksRewriteEngine onRewriteRule (.*) www.iros.me/$1 [R=301,L] 当然，后面不要忘了去google提交你的新域名方便以后的收录哦 然后要哭一下我的 WWW.TODAY-S-OOXX.COM，过期忘了交钱，锁三个月结果我又忘了去拿回，现在变成卖治疗糖尿病手环的站子了。。。555 标签：htacess, 域名, 重定向<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96" 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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29583537.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !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="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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://originalcolors.cn" class="autohyperlink" title="http://originalcolors.cn" target="_blank">originalcolors.cn</a> 08年注册的域名，当时还真没去想长短问题||| 曾经被人说“如果不添加上链接让我点，我绝对懒得去输入的喂！~”，不过，确实是很喜欢的一首歌的名字，也就这么久的用着了~~</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  width="257"  height="33"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ><param name="src"  value="http://www.xiami.com/widget/0_1769027453/singlePlayer.swf" /><param name="wmode"  value="transparent" /><embed type="application/x-shockwave-flash"  width="257"  height="33"  src="http://www.xiami.com/widget/0_1769027453/singlePlayer.swf"  wmode="transparent" ></embed></object></p>
<p>不过，CN域名不但被人BS还日子越来越不好过。。。于是想着，还是想想换吧。新域名 iros.me ，其实意思和以前一样的，哈哈，换了一国语言而已~~</p>
<p><span id="more-809" ></span></p>
<p>到手3个月了因为懒得做设置一直闲着没用，因为我暂时想两个域名一起指向我的work网站，原来的域名毕竟有被搜索引擎收录，从原网站地址进入能直接跳到新网站相应页面就好了，前面没搞清楚原理瞎折腾老是不能正常访问，原来只要做301的重定向设置就好了，尤其，你如果用 wordpress，并且是Linux服务器主机，apach就方便老多啦~~ 其他情况可以看 <a  href="http://www.seoueosem.com/content_2_98_zh_301%E9%87%8D%E5%AE%9A%E5%90%91%E5%AE%9E%E7%8E%B0%E6%89%80%E6%9C%89%E7%BD%91%E9%A1%B5%E8%BD%AC%E5%90%91-%E5%90%8C%E4%B8%80%E7%A9%BA%E9%97%B42%E4%B8%AA%E5%9F%9F%E5%90%8D%E8%BD%AC%E5%90%91.html" target="_blank">这里</a> 的说明</p>
<p>在旧的网站根目录下，修改.htaccess文件就可以咯~~ 加上下面几行代码，一切就搞定！~ 当然，因为2个域名下的目录文件记得保持一致~</p>
<p>Options +FollowSymLinks<br/>
RewriteEngine on<br/>
RewriteRule (.*) <a  href="http://www.iros.me/$1" class="autohyperlink" title="http://www.iros.me/$1" target="_blank">www.iros.me/$1</a> [R=301,L]<br/>
Options +FollowSymLinksRewriteEngine onRewriteRule (.*) <a  href="http://www.iros.me/$1" class="autohyperlink" title="http://www.iros.me/$1" target="_blank">www.iros.me/$1</a> [R=301,L]</p>
<p>当然，后面不要忘了去google提交你的新域名方便以后的收录哦</p>
<blockquote><p>然后要哭一下我的 <a  href="http://WWW.TODAY-S-OOXX.COM" class="autohyperlink" title="http://WWW.TODAY-S-OOXX.COM" target="_blank">WWW.TODAY-S-OOXX.COM</a>，过期忘了交钱，锁三个月结果我又忘了去拿回，现在变成卖治疗糖尿病手环的站子了。。。555</p></blockquote>
<table class="wumii-related-items"  cellspacing="0"  cellpadding="3"  border="0"  style="clear: both;" >
    
    <tr>
        <td colspan="4" ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;" >您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96"  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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29583537.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !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="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&#038;from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&#038;from=http%3A%2F%2Fwww.iros.me%2F301-redirect-seo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >WordPress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4"  align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/htacess" title="htacess" rel="tag">htacess</a>, <a href="http://www.iros.me/tag/%e5%9f%9f%e5%90%8d" title="域名" rel="tag">域名</a>, <a href="http://www.iros.me/tag/%e9%87%8d%e5%ae%9a%e5%90%91" title="重定向" rel="tag">重定向</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/301-redirect-seo.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Fields 自定义字段使用</title>
		<link>http://www.iros.me/wordpress-custom-fields.html</link>
		<comments>http://www.iros.me/wordpress-custom-fields.html#comments</comments>
		<pubDate>Thu, 06 May 2010 09:29:52 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[┨Stuuuuuuuudy]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[自定义字段]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=632</guid>
		<description><![CDATA[wordpress是好物，我的大爱，啥都能做了,最近算是转型期，不知道转不转的过弯来，有用的东西先记录一下~~ 1. 设定过期时间 &#60;?php if (have_posts()) : while (have_posts()) : the_post(); ?&#62; $expirationtime = get_post_custom_values(&#8216;expiration&#8217;); if (is_array($expirationtime)) { $expirestring = implode($expirationtime);} $secondsbetween = strtotime($expirestring)-time(); if ( $secondsbetween &#62; 0 ) { // For example&#8230; the_title(); the_excerpt(); } endwhile; endif;?&#62; 2.区分日志显示方式 &#60;?php if (have_posts()) : while (have_posts()) : the_post(); $customField = get_post_custom_values(&#8220;full&#8221;); if (isset($customField[0])) { //Custom [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="自定义404页面，啥时候我也上一个！~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-custom-404-pages.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29584954.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">自定义404页面，啥时候我也上一个！~</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="Wordpress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-seo-cheat-sheet.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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是好物，我的大爱，啥都能做了,最近算是转型期，不知道转不转的过弯来，有用的东西先记录一下~~</p>
<p><strong>1. 设定过期时间</strong></p>
<p>&lt;?php<br/>
if (have_posts()) :<br/>
while (have_posts()) : the_post(); ?&gt;<br/>
$expirationtime = get_post_custom_values(&#8216;expiration&#8217;);<br/>
if (is_array($expirationtime)) {<br/>
$expirestring = implode($expirationtime);}<br/>
$secondsbetween = strtotime($expirestring)-time();<br/>
if ( $secondsbetween &gt; 0 ) {<br/>
// For example&#8230;<br/>
the_title();<br/>
the_excerpt();<br/>
}<br/>
endwhile;<br/>
endif;?&gt;</p>
<p><span id="more-632" ></span><strong>2.区分日志显示方式</strong></p>
<p>&lt;?php if (have_posts()) :<br/>
while (have_posts()) : the_post();<br/>
$customField = get_post_custom_values(&#8220;full&#8221;);<br/>
if (isset($customField[0])) {<br/>
//Custom field is set, display a full post<br/>
the_title();<br/>
the_content();<br/>
} else {<br/>
// No custom field set, let&#8217;s display an excerpt<br/>
the_title();<br/>
the_excerpt();<br/>
endwhile;<br/>
endif;<br/>
?&gt;</p>
<p><strong>3.设定页面META内容</strong></p>
<p>&lt;meta name=&#8221;description&#8221; content=&#8221;<br/>
&lt;?php if ( (is_home()) || (is_front_page()) ) {<br/>
echo (&#8216;Your main description goes here&#8217;);<br/>
} elseif(is_category()) {<br/>
echo category_description();<br/>
} elseif(is_tag()) {<br/>
echo &#8216;-tag archive page for this blog&#8217; . single_tag_title();<br/>
} elseif(is_month()) {<br/>
echo &#8216;archive page for this blog&#8217; . the_time(&#8216;F, Y&#8217;);<br/>
} else {<br/>
echo get_post_meta($post-&gt;ID, &#8220;Metadescription&#8221;, true);<br/>
}?&gt;&#8221;&gt;</p>
<p><strong>4.设置特殊的CSS</strong></p>
<p>&lt;?php if (is_single()) {<br/>
$css = get_post_meta($post-&gt;ID, &#8216;css&#8217;, true);<br/>
if (!empty($css)) { ?&gt;<br/>
&lt;style type=&#8221;text/css&#8221;&gt;<br/>
&lt;?php echo $css; ?&gt;<br/>
&lt;style&gt;<br/>
&lt;?php }<br/>
} ?&gt;</p>
<p><strong>5. SEO Title优化</strong></p>
<p>&lt;title&gt;<br/>
&lt;?php if (is_home () ) {<br/>
bloginfo(&#8216;name&#8217;);<br/>
} elseif ( is_category() ) {<br/>
single_cat_title(); echo &#8216; &#8211; &#8216; ; bloginfo(&#8216;name&#8217;);<br/>
} elseif (is_single() ) {<br/>
$customField = get_post_custom_values(&#8220;title&#8221;);<br/>
if (isset($customField[0])) {<br/>
echo $customField[0];<br/>
} else {<br/>
single_post_title();<br/>
}<br/>
} elseif (is_page() ) {<br/>
bloginfo(&#8216;name&#8217;); echo &#8216;: &#8216;; single_post_title();<br/>
} else {<br/>
wp_title(&#8221;,true);<br/>
} ?&gt;<br/>
&lt;/title&gt;</p>
<p><strong>6.设定不被搜索引擎搜索</strong></p>
<p>&lt;?php $cf = get_post_meta($post-&gt;ID, &#8216;noindex&#8217;, true);<br/>
if (!empty($cf)) {<br/>
echo &#8216;&lt;meta name=&#8221;robots&#8221; content=&#8221;noindex&#8221;/&gt;&#8217;;<br/>
}<br/>
?&gt;</p>
<p><strong>7.使用缩略图（2.9+自带了）</strong></p>
<p>&lt;?php $postimageurl = get_post_meta($post-&gt;ID, &#8216;post-img&#8217;, true);<br/>
if ($postimageurl) {?&gt;<br/>
&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; rel=&#8221;bookmark&#8221;&gt;<br/>
&lt;img src=&#8221;&lt;?php echo $postimageurl; ?&gt;&#8221; alt=&#8221;Post Pic&#8221; /&gt;&lt;/a&gt;<br/>
&lt;?php } else { ?&gt;<br/>
&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221; rel=&#8221;bookmark&#8221;&gt;<br/>
&lt;img src=&#8221;&lt;?php bloginfo(&#8216;template_url&#8217;); ?&gt;/images/wprecipes.gif&#8221; alt=&#8221;Screenshot&#8221; /&gt;&lt;/a&gt;<br/>
&lt;?php } ?&gt;</p>
<p><strong>8.个性化的read more</strong></p>
<p>&lt;?php $custommore = get_post_meta($post-&gt;ID, &#8216;custom_more&#8217;, true); ?&gt;<br/>
&lt;?php if (!$custommore) { $custommore = &#8216;Read More &amp;raquo;&#8217;; } ?&gt;<br/>
&lt;?php the_content($custommore); ?&gt;</p>
<p><strong>9.设置个性化背景（与<a  href="http://code.google.com/p/timthumb">timthumb</a>结合</strong><strong>）</strong></p>
<p>&lt;?php if (is_page() || is_single()) {<br/>
&lt;?php $background = get_post_meta($post-&gt;ID, &#8216;background&#8217;, true);<br/>
if ($background) {?&gt;<br/>
&lt;style type=&#8221;text/css&#8221;&gt;background: url(&lt;?php bloginfo(&#8216;template_url&#8217;); ?&gt;/timthumb/timthumb.php?w=1920&amp;zc=1&amp;src=&lt;?php echo $background; ?&gt;) fixed no-repeat;&lt;/style&gt;<br/>
&lt;?php }<br/>
}?&gt;</p>
<p>=========================</p>
<h2><strong>相关技巧</strong></h2>
<p><strong>1.获取循环外的 custom field</strong></p>
<p>&lt;?php<br/>
global $wp_query;<br/>
$postid = $wp_query-&gt;post-&gt;ID;<br/>
echo get_post_meta($postid, &#8216;customField&#8217;, true);<br/>
?&gt;</p>
<p><strong>2.获得第一张图片</strong></p>
<p>&lt;?php<br/>
// Get URL of first image in a post<br/>
function catch_that_image() {<br/>
global $post, $posts;<br/>
$first_img = &#8221;;<br/>
ob_start();<br/>
ob_end_clean();<br/>
$output = preg_match_all(&#8216;/&lt;img.+src=[\'"]([^\'"]+)[\'"].*&gt;/i&#8217;, $post-&gt;post_content, $matches);<br/>
$first_img = $matches [1] [0];<br/>
// no image found display default image instead<br/>
if(empty($first_img)){<br/>
$first_img = &#8220;/images/default.jpg&#8221;;<br/>
}<br/>
return $first_img;<br/>
}?&gt;</p>
<p><strong>3.筛选有某一自定义值的日志</strong></p>
<p>query_posts(&#8220;meta_key=Camera_Specs&#8221;);</p>
<p>=========================</p>
<h2>相关插件</h2>
<p><a  href="http://wordpress.org/extend/plugins/more-fields/" target="_blank">More Fields</a></p>
<p><a  href="http://wordpress.org/extend/plugins/custom-shortcodes/" target="_blank">Custom Shortcodes</a></p>
<p class="post-title" >还搜到了帕兰印象的 <a  title="20+Wordpress自定义字段使用技巧和插件/Custom Fields" rel="bookmark" href="http://paranimage.com/20-wordpress-custom-fields-tricks-and-plugins/">20+Wordpress自定义字段使用技巧和插件/Custom Fields</a> ，可以研究下~<a  title="20+Wordpress自定义字段使用技巧和插件/Custom Fields" rel="bookmark" href="http://paranimage.com/20-wordpress-custom-fields-tricks-and-plugins/"><br/>
</a></p>
<table class="wumii-related-items"  cellspacing="0"  cellpadding="3"  border="0"  style="clear: both;" >
    
    <tr>
        <td colspan="4" ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;" >您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important;" >
                    <a  target="_blank" title="自定义404页面，啥时候我也上一个！~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-custom-404-pages.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29584954.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >自定义404页面，啥时候我也上一个！~</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="Wordpress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-seo-cheat-sheet.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-custom-fields.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >WordPress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4"  align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/custom-fields" title="custom fields" rel="tag">custom fields</a>, <a href="http://www.iros.me/tag/wordpress" title="Wordpress" rel="tag">Wordpress</a>, <a href="http://www.iros.me/tag/%e8%87%aa%e5%ae%9a%e4%b9%89%e5%ad%97%e6%ae%b5" title="自定义字段" rel="tag">自定义字段</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/wordpress-custom-fields.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>学习使用强大的query_posts()，wordpress日志调用咱爱咋咋地~~</title>
		<link>http://www.iros.me/powerful-query-posts.html</link>
		<comments>http://www.iros.me/powerful-query-posts.html#comments</comments>
		<pubDate>Tue, 30 Dec 2008 03:14:47 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Ooooooother]]></category>
		<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[┨Stuuuuuuuudy]]></category>
		<category><![CDATA[query_posts]]></category>
		<category><![CDATA[Wordpress修改]]></category>
		<category><![CDATA[日志调用]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=346</guid>
		<description><![CDATA[昏天暗地折腾新的主题ING，发现query_posts()真是无比强大，记录一下~~ 将query_posts()放在LOOP之前限定你所需要的条件，wp_query会产生一个新的使用你的参数的SQL查询，而忽视通过URL接收到的其它的参数，如果想不忽略，可以在调用中使用$query_string。 query_posts&#40;$query_string . &#34;&#38;order=ASC&#34;&#41; 设置文章显示的顺序，但是不干扰其余的查询字符串，参数前须有“&#038;”符号 其他还有N多用途~~ 主页不显示某一分类下的日志 &#60;?php if &#40;is_home&#40;&#41;&#41; &#123; query_posts&#40;&#34;cat=-3&#34;&#41;; &#125; ?&#62; 获得特定的日志 &#60;?php query_posts&#40;'p=5'&#41;; ?&#62; 获得特定的页面 &#60;?php query_posts&#40;'page_id=7'&#41;; //只返回网页7 ?&#62; &#60;?php query_posts&#40;'pagename=about'&#41;; //只返回关于网页 ?&#62; &#60;?php query_posts&#40;'pagename=parent/child'&#41;; // 返回母网页的子网页 ?&#62; 创建所有文章列表，并且提供分页功能 &#60;?php query_posts&#40;$query_string.'posts_per_page=-1'&#41;; while&#40;have_posts&#40;&#41;&#41; &#123; the_post&#40;&#41;; put your loop here ; &#125; ?&#62; ========================================== 类别 参数 显示属于某个类别的文章 cat category_name 根据ID显示一个类别 只显示来自一个类别ID的文章 query_posts&#40;'cat=4'&#41;; [...]<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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html&from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1" color="#666666" 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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-themes-collection.html&from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">Wordpress 主题收集（2008.12.15更新）</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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">我自己做的Wordpress Test站大集合！~ 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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>昏天暗地折腾新的主题ING，发现query_posts()真是无比强大，记录一下~~</p>
<p>将query_posts()放在LOOP之前限定你所需要的条件，wp_query会产生一个新的使用你的参数的SQL查询，而忽视通过URL接收到的其它的参数，如果想不忽略，可以在调用中使用$query_string。</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #000088;" >$query_string</span> <span style="color: #339933;" >.</span> <span style="color: #0000ff;" >&quot;&amp;order=ASC&quot;</span><span style="color: #009900;" >&#41;</span></pre></div></div>

<p>设置文章显示的顺序，但是不干扰其余的查询字符串，参数前须有“&#038;”符号</p>
<p>其他还有N多用途~~</p>
<p><span id="more-346" ></span></p>
<ul>
<li>主页不显示某一分类下的日志</li>
</ul>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
   <span style="color: #b1b100;" >if</span> <span style="color: #009900;" >&#40;</span>is_home<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span> <span style="color: #009900;" >&#123;</span>
      query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >&quot;cat=-3&quot;</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
   <span style="color: #009900;" >&#125;</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>

<ul>
<li>获得特定的日志</li>
</ul>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'p=5'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>

<ul>
<li>获得特定的页面</li>
</ul>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'page_id=7'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>      <span style="color: #666666; font-style: italic;" >//只返回网页7</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>


<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'pagename=about'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span> <span style="color: #666666; font-style: italic;" >//只返回关于网页</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>


<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'pagename=parent/child'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span> <span style="color: #666666; font-style: italic;" >// 返回母网页的子网页</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>

<ul>
<li>创建所有文章列表，并且提供分页功能</li>
</ul>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >&lt;?php</span>
query_posts<span style="color: #009900;" >&#40;</span><span style="color: #000088;" >$query_string</span><span style="color: #339933;" >.</span><span style="color: #0000ff;" >'posts_per_page=-1'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
<span style="color: #b1b100;" >while</span><span style="color: #009900;" >&#40;</span>have_posts<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span> <span style="color: #009900;" >&#123;</span> the_post<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
put your loop here <span style="color: #339933;" >;</span>
<span style="color: #009900;" >&#125;</span>
<span style="color: #000000; font-weight: bold;" >?&gt;</span></pre></div></div>

<p>==========================================</p>
<h3>类别 参数</h3>
<p><strong>显示属于某个类别的文章 </strong></p>
<ul>
<li> cat</li>
<li> category_name</li>
</ul>
<p><strong>根据ID显示一个类别</strong></p>
<p>只显示来自一个类别ID的文章</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=4'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p><strong>根据名称显示一个类别</strong></p>
<p>只显示属于某个类别名的文章</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'category_name=Staff Home'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p><strong>显示几个类别及ID</strong></p>
<p>显示属于几个类别ID的文章</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=2,6,17,38'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p><strong>删除某个类别的文章</strong></p>
<p>显示所有的文章，但是类别ID前面有个&#8217;-'（负号）负号的类被除外。</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=-3'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>删除属于类别3的所有文章。有一个限制性条款：会删除只属于类别3的所有文章。如果一个类别也同时属于其它的类别，这个类别仍然不会被删除。</p>
<h3>标签参数</h3>
<p><strong>显示与某个标签相关的文章 </strong></p>
<ul>
<li> tag</li>
</ul>
<p><strong>为某个标签提取文章</strong></p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'tag=cooking'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p><strong>获得拥有任何这样的标签的文章</strong></p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'tag=bread,baking'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p><strong>获取拥有这三个标签的文章 </strong></p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'tag=bread+baking+recipe'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<h3>作者参数</h3>
<p><strong>你也可以根据作者限制文章数目 </strong></p>
<ul>
<li> author_name=Harriet</li>
<li> author=3</li>
</ul>
<p>author_name在 user_nicename区操作, 同时作者 在作者id上操作。</p>
<h3>文章 &#038; 网页参数</h3>
<p><strong>返回一篇单独的文章或者一个单独的网页</strong></p>
<ul>
<li> p=1 &#8211; 使用文章 ID来显示第一篇文章</li>
<li> name=first-post &#8211; 使用 <a  title="WordPress:Introduction to Blogging" href="http://www.zzbaike.com/wiki/WordPress:Introduction_to_Blogging#Post_Slugs">post Slug</a> 显示第一篇文章</li>
<li> page_id=7</li>
<li> pagename=about</li>
<li> showposts=1 (你可以使用 showposts=3,或者其它的任何数字显示一定数目的文章)</li>
</ul>
<p>由于 <a  title="WordPress:Template Hierarchy" href="http://www.zzbaike.com/wiki/WordPress:Template_Hierarchy">模板层级</a>方面的原因, home.php先执行了。这意味这你可以编写一个home.php，home.phh调用query_posts()重新得到一个特别的网页并且将那个网页设置为你的首页。没有任何插件或者hacks，你需要运行一个机制，并且显示和维护一个非博客的首页。</p>
<p>更有用的方法，可能是利用WP的<a  title="WordPress:Pages" href="http://www.zzbaike.com/wiki/WordPress:Pages">网页</a>功能并且为你的首页使用这个功能。你可以将&#8221;关于网页&#8221;设置为entry point或者设置为站点的末页。你可能执行一些更动态的步骤，设置一个自定义网页，显示最近的评论，文章，类别，存档。请看看下面的例子。</p>
<h3>时间参数</h3>
<p><strong>得到某个特别的时间段内发表的文章 </strong></p>
<ul>
<li> hour=</li>
<li> minute=</li>
<li> second=</li>
<li> day= &#8211; 一个月中的每一天; 显示，例如，十五号发表的所有文章。</li>
<li> monthnum=</li>
<li> year=</li>
</ul>
<h3>网页参数</h3>
<ul>
<li> paged=2 -显示使用&#8221;以前发表的文章&#8221;链接时，通常在网页2上显示的文章。</li>
</ul>
<ul>
<li> posts_per_page=10  -每个网页显示的文章数目；-1这个值，会显示所有的文章。</li>
</ul>
<ul>
<li> order=ASC -按时间顺序显示文章，以相反的顺序显示DESC（默认）</li>
</ul>
<h3>Offset 参数</h3>
<p>你不能转移或者忽视一个或者更多的原始文章，这些文章一般是你的query同时使用offset参数收集到的。</p>
<p>下面的函数会显示（1）最近的5篇文章</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'showposts=5&amp;offset=1'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<h3>根据参数排序</h3>
<p><strong>根据这个区给得到的文章排序 </strong></p>
<ul>
<li> orderby=author</li>
<li> orderby=date</li>
<li> orderby=category</li>
<li> orderby=title</li>
<li> orderby=modified</li>
<li> orderby=modified</li>
<li> orderby=menu_order</li>
<li> orderby=parent</li>
<li> orderby=ID</li>
<li> orderby=rand</li>
</ul>
<p>同时考虑&#8221;ASC&#8221;或者的&#8221;DESC&#8221;的排序参数</p>
<h3>联合参数</h3>
<p>你可能从上面的例子中注意到，你使用一个&#038;（&#038;符号）将参数组合在一起，像：</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=3&amp;year=2004'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>类别13，关于当前月份显示在主页上的文章：</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" ><span style="color: #b1b100;" >if</span> <span style="color: #009900;" >&#40;</span>is_home<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span>  <span style="color: #009900;" >&#123;</span>
query_posts <span style="color: #009900;" >&#40;</span><span style="color: #000088;" >$query_string</span> <span style="color: #339933;" >.</span> <span style="color: #0000ff;" >'&amp;cat=13&amp;monthnum='</span> <span style="color: #339933;" >.</span> <span style="color: #990000;" >date</span><span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'n'</span><span style="color: #339933;" >,</span>current_time<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'timestamp'</span><span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span> <span style="color: #009900;" >&#125;</span></pre></div></div>

<p>在2.3版本中，这个参数组合会返回属于类别1同时属于类别3的文章，只显示两篇（2）文章，根据标题，按降序排列：</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #990000;" >array</span><span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'category__and'</span><span style="color: #339933;" >=&gt;</span>array<span style="color: #009900;" >&#40;</span><span style="color: #cc66cc;" >1</span><span style="color: #339933;" >,</span><span style="color: #cc66cc;" >3</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >,</span><span style="color: #0000ff;" >'showposts'</span><span style="color: #339933;" >=&gt;</span><span style="color: #cc66cc;" >2</span><span style="color: #339933;" >,</span><span style="color: #0000ff;" >'orderby'</span><span style="color: #339933;" >=&gt;</span>title<span style="color: #339933;" >,</span><span style="color: #0000ff;" >'order'</span><span style="color: #339933;" >=&gt;</span>DESC<span style="color: #009900;" >&#41;</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>在2.3和2.5版本中，你可能期待下面的内容，返回属于类别1并且标签为&#8221;苹果&#8221;的所有文章</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=1&amp;tag=apples'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>一个bug阻止这个运行。请看看<a  class="external text" title="http://trac.wordpress.org/ticket/5433" rel="nofollow" href="http://trac.wordpress.org/ticket/5433" target="_blank">Ticket #5433</a>，一个工作区要搜索几个使用+的标签</p>

<div class="wp_syntax" ><div class="code" ><pre class="php"  style="font-family:monospace;" >query_posts<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >'cat=1&amp;tag=apples+apples'</span><span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>对于先前的查询，这个会产生期待的结果。注意使用&#8217;cat=1&#038;tag=apples+oranges&#8217;能够产生期待的结果。</p>
<blockquote><p> 资料来源：<a  href="http://www.zzbaike.com/wiki/Template_Tags/query_posts" target="_blank">站长百科 Template Tags/query posts</a> </p></blockquote>
<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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1"  color="#666666"  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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-themes-collection.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >WordPress 主题收集（2008.12.15更新）</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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >我自己做的Wordpress Test站大集合！~ 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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fpowerful-query-posts.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/query_posts" title="query_posts" rel="tag">query_posts</a>, <a href="http://www.iros.me/tag/wordpress%e4%bf%ae%e6%94%b9" title="Wordpress修改" rel="tag">Wordpress修改</a>, <a href="http://www.iros.me/tag/%e6%97%a5%e5%bf%97%e8%b0%83%e7%94%a8" title="日志调用" rel="tag">日志调用</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/powerful-query-posts.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>今天无意间发现了wordpress 2.7后台Matrix彩蛋！~~ 吼吼~~</title>
		<link>http://www.iros.me/wordpress-27-matrix-egg.html</link>
		<comments>http://www.iros.me/wordpress-27-matrix-egg.html#comments</comments>
		<pubDate>Thu, 18 Dec 2008 04:43:05 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Dooooitmyself]]></category>
		<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[2.7]]></category>
		<category><![CDATA[egg]]></category>
		<category><![CDATA[The Matrix]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[后台]]></category>
		<category><![CDATA[彩蛋]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=329</guid>
		<description><![CDATA[是GIF的哟~点开了看大图~~ 在后台改东西，突然发现上次我明明重新发布过的东西内容根本没更新，于是就去找自动保存版本恢复，说实在，这事以前没干过&#124;&#124;&#124; 真正自己用WP也就3个来月嘛。。。 查看自动保存版本，最右边恢复俩字也太不明显了吧&#124;&#124;&#124; 所以说我不喜欢2.7的后台，2.6的是不是大一些啊？~虽然我自己也没去注意过&#124;&#124;&#124;  因为找不到就开始乱点，不知道那个对比有什么用，就干了下面那种事情，然后！！！突然就变成中间那样子，顶上的标题栏还写着 “Danger！”，Matrix我前些日子才刚刚补完啊，一开始还真是吓了一跳，然后反应过来应该是个彩蛋，很兴奋的叫办公室其他家伙来看~~ 然后截了图十分P颠P颠的想拿出去现一番的时候，理智让我先去搜索一下，省得丢脸，果然。。。人家2.6老早就发现过这个了，还有视频哩，嘛嘛，我就在自己这里偷偷滴为这个偶然的发现高兴一下好啦~~ 标签：2.7, egg, The Matrix, Wordpress, 后台, 彩蛋<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="The Animatrix 骇客帝国动画版 相关" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fthe-matrix-and-related.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">The Animatrix 骇客帝国动画版 相关</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="Wordpress 主题收集 PART 2" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-theme-collection-part2.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress 主题收集 PART 2</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>是GIF的哟~点开了看大图~~</p>
<p><a  class="highslide-image" onclick="return hs.expand(this);" href="http://www.originalcolors.cn/myfile/matrix.gif"><img title="Click to enlarge"  src="http://www.originalcolors.cn/myfile/matrix.gif"  alt="image" /></a></p>
<p><span id="more-329" ></span>在后台改东西，突然发现上次我明明重新发布过的东西内容根本没更新，于是就去找自动保存版本恢复，说实在，这事以前没干过||| 真正自己用WP也就3个来月嘛。。。</p>
<p>查看自动保存版本，最右边恢复俩字也太不明显了吧||| 所以说我不喜欢2.7的后台，2.6的是不是大一些啊？~虽然我自己也没去注意过|||  因为找不到就开始乱点，不知道那个对比有什么用，就干了下面那种事情，然后！！！突然就变成中间那样子，顶上的标题栏还写着 “Danger！”，Matrix我前些日子才刚刚补完啊，一开始还真是吓了一跳，然后反应过来应该是个彩蛋，很兴奋的叫办公室其他家伙来看~~</p>
<p>然后截了图十分P颠P颠的想拿出去现一番的时候，理智让我先去搜索一下，省得丢脸，果然。。。人家2.6老早就发现过这个了，还有视频哩，嘛嘛，我就在自己这里偷偷滴为这个偶然的发现高兴一下好啦~~</p>
<table class="wumii-related-items"  cellspacing="0"  cellpadding="3"  border="0"  style="clear: both;" >
    
    <tr>
        <td colspan="4" ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;" >您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important;" >
                    <a  target="_blank" title="The Animatrix 骇客帝国动画版 相关" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fthe-matrix-and-related.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >The Animatrix 骇客帝国动画版 相关</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="Wordpress 主题收集 PART 2" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-theme-collection-part2.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >WordPress 主题收集 PART 2</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我自己做的Wordpress Test站大集合！~ WordPress是好物！~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-websites.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-27-matrix-egg.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29586156.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我自己做的Wordpress Test站大集合！~ WordPress是好物！~~</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4"  align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/27" title="2.7" rel="tag">2.7</a>, <a href="http://www.iros.me/tag/egg" title="egg" rel="tag">egg</a>, <a href="http://www.iros.me/tag/the-matrix" title="The Matrix" rel="tag">The Matrix</a>, <a href="http://www.iros.me/tag/wordpress" title="Wordpress" rel="tag">Wordpress</a>, <a href="http://www.iros.me/tag/%e5%90%8e%e5%8f%b0" title="后台" rel="tag">后台</a>, <a href="http://www.iros.me/tag/%e5%bd%a9%e8%9b%8b" title="彩蛋" rel="tag">彩蛋</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/wordpress-27-matrix-egg.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wprecipes.com 像我这样的WP新手一不错的去处，能学不少东西~~</title>
		<link>http://www.iros.me/wprecipes-a-good-place-for-wordpress-beginner.html</link>
		<comments>http://www.iros.me/wprecipes-a-good-place-for-wordpress-beginner.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 08:30:04 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wprecipes]]></category>
		<category><![CDATA[学习]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=203</guid>
		<description><![CDATA[一Niubility滴小哥十月才新开的博，讲一些Wordpess修改方面的小技巧，并且会回答大家提出的各种问题，我也要去的，准备准备，虽然不少小功能都可以找些这个那个插件实现，8过，被各个插件JS冲突搞得头大的我还是觉得，能简单自己修改搞定的，还是直接动手吧。。。虽然是E文，不过都很简单很好懂的~~ 看了一下我感兴趣滴，回头尝试动动手~~ 按时间逆序排列回复列表，新的在上面 将普通回复与Trackback区别开 防止你的Wordpress被盗链的方法 动态高亮区别当前页 让WP的不同页面显示不同的头部样式 随机更换主题的顶部图片 为不同分类创建不同的模板 目前才一个多月已经有50多个技巧了哟，自己去 看看 吧~~ 标签：Wordpress, wprecipes, 学习, 技巧<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="晃眼又是一月过啊~~再来个WP吧，第18个~ WUWA" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F18th-wordpress-wuwa.html&from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29585480.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">晃眼又是一月过啊~~再来个WP吧，第18个~ WUWA</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;">
                    <a target="_blank" title="[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="90px" height="90px" /><br />
                        <font size="-1" color="#666666" style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>一Niubility滴小哥十月才新开的博，讲一些Wordpess修改方面的小技巧，并且会回答大家提出的各种问题，我也要去的，准备准备，虽然不少小功能都可以找些这个那个插件实现，8过，被各个插件JS冲突搞得头大的我还是觉得，能简单自己修改搞定的，还是直接动手吧。。。虽然是E文，不过都很简单很好懂的~~</p>
<p><a  class="highslide-image" onclick="return hs.expand(this);" href="http://www.originalcolors.cn/work/wp-content/plugins/pika/readimg.php?src=http%3A%2F%2Flh6.gouride.com%2F_SAtXNAuCabM%2FSSPLUftVGFI%2FAAAAAAAAA5o%2FwYOhwEq_JbU%2Fwprecibes.jpg?imgmax=800"><img title="Click to enlarge"  src="http://www.originalcolors.cn/work/wp-content/plugins/pika/readimg.php?src=http%3A%2F%2Flh6.gouride.com%2F_SAtXNAuCabM%2FSSPLUftVGFI%2FAAAAAAAAA5o%2FwYOhwEq_JbU%2Fwprecibes.jpg?imgmax=800"  alt="image" /></a></p>
<p><span id="more-203" ></span>看了一下我感兴趣滴，回头尝试动动手~~</p>
<ul>
<li><a  href="http://www.wprecipes.com/how-to-reverse-wordpress-comments-order" target="_blank">按时间逆序排列回复列表，新的在上面</a></li>
<li><a  href="http://www.wprecipes.com/how-to-reverse-wordpress-comments-order" target="_blank">将普通回复与Trackback区别开</a></li>
<li><a  href="http://www.wprecipes.com/how-to-protect-your-wordpress-blog-from-hotlinking" target="_blank">防止你的Wordpress被盗链的方法</a></li>
<li><a  href="http://http://www.wprecipes.com/frank-asked-how-to-dynamically-highlight-current-page" target="_blank">动态高亮区别当前页</a></li>
<li><a  href="http://www.wprecipes.com/how-to-use-multiple-custom-headers-on-a-wordpress-theme" target="_blank">让WP的不同页面显示不同的头部样式</a></li>
<li><a  href="http://www.wprecipes.com/how-to-display-a-random-header-image" target="_blank">随机更换主题的顶部图片</a></li>
<li><a  href="http://www.wprecipes.com/how-to-use-different-single-template-per-category" target="_blank">为不同分类创建不同的模板</a></li>
</ul>
<blockquote><p>目前才一个多月已经有50多个技巧了哟，自己去 <a  href="http://www.wprecipes.com/" target="_blank">看看</a> 吧~~</p></blockquote>
<table class="wumii-related-items"  cellspacing="0"  cellpadding="3"  border="0"  style="clear: both;" >
    
    <tr>
        <td colspan="4" ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;" >您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important;" >
                    <a  target="_blank" title="Wordpress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-themes.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >WordPress 主题框架推荐，我自己爱用的 Sandbox WP 大集合~ 第16个新鲜出炉~~</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="晃眼又是一月过啊~~再来个WP吧，第18个~ WUWA" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F18th-wordpress-wuwa.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29585480.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >晃眼又是一月过啊~~再来个WP吧，第18个~ WUWA</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/site_images/2011/09/09/29587684.jpg"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >我的又一个新站~ Cargo，数了一下这是自己做的第14个wordpress了哇。。。</font>
                    </a>
                </td>
                <td width="96"  valign="top"  style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #B0BF32 !important;" >
                    <a  target="_blank" title="[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwprecipes-a-good-place-for-wordpress-beginner.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #B0BF32 !important; width: 90px !important; height: 90px !important;"  src="http://static.wumii.com/images/blogWidget/wordpress_default.gif"  width="90px"  height="90px" /><br/>
                        <font size="-1"  color="#666666"  style="display: block !important; line-height: 15px !important; width: 96px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;" >[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4"  align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/wordpress" title="Wordpress" rel="tag">Wordpress</a>, <a href="http://www.iros.me/tag/wprecipes" title="wprecipes" rel="tag">wprecipes</a>, <a href="http://www.iros.me/tag/%e5%ad%a6%e4%b9%a0" title="学习" rel="tag">学习</a>, <a href="http://www.iros.me/tag/%e6%8a%80%e5%b7%a7" title="技巧" rel="tag">技巧</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/wprecipes-a-good-place-for-wordpress-beginner.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress技术手册 基本文件及参数说明</title>
		<link>http://www.iros.me/wordpress-technical-manual.html</link>
		<comments>http://www.iros.me/wordpress-technical-manual.html#comments</comments>
		<pubDate>Thu, 23 Oct 2008 14:01:32 +0000</pubDate>
		<dc:creator>ponytail</dc:creator>
				<category><![CDATA[┨Skill]]></category>
		<category><![CDATA[Wordpress修改]]></category>
		<category><![CDATA[参考]]></category>
		<category><![CDATA[技术手册]]></category>

		<guid isPermaLink="false">http://www.originalcolors.cn/work/?p=67</guid>
		<description><![CDATA[天暗地改皮肤和插件ING，要用到的，记一下 WordPress基本模板文件 一套完整的WordPress模板应至少具有如下文件： style.css : CSS(样式表)文件 index.php : 主页模板 archive.php : Archive/Category模板 404.php : Not Found 错误页模板 comments.php : 留言/回复模板 footer.php : Footer模板 header.php : Header模板 sidebar.php : 侧栏模板 page.php : 内容页(Page)模板 single.php : 内容页(Post)模板 searchform.php : 搜索表单模板 search.php : 搜索结果模板 当然，具体到特定的某款模板，可能不止这些文件，但一般而言，这些文件是每套模板所必备的。 基本条件判断Tag is_home() : 是否为主页 is_single() : 是否为内容页(Post) is_page() : 是否为内容页(Page) is_category() : 是否为Category/Archive页 [...]<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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-seo-cheat-sheet.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">Wordpress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~</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.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">我的又一个新站~ Cargo，数了一下这是自己做的第14个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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-theme-collection-part2.html&from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1" color="#666666" style="line-height: 1.65em; font-size: 12px !important;">Wordpress 主题收集 PART 2</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>天暗地改皮肤和插件ING，要用到的，记一下</p>
<p><strong>WordPress基本模板文件</strong></p>
<p>一套完整的WordPress模板应至少具有如下文件：</p>
<ul>
<li><strong>style.css</strong> : CSS(样式表)文件</li>
<li><strong>index.php</strong> : 主页模板</li>
<li><strong>archive.php</strong> : Archive/Category模板</li>
<p><span id="more-67" ></span></p>
<li><strong>404.php</strong> : Not Found 错误页模板</li>
<li><strong>comments.php</strong> : 留言/回复模板</li>
<li><strong>footer.php</strong> : Footer模板</li>
<li><strong>header.php</strong> : Header模板</li>
<li><strong>sidebar.php</strong> : 侧栏模板</li>
<li><strong>page.php</strong> : 内容页(Page)模板</li>
<li><strong>single.php</strong> : 内容页(Post)模板</li>
<li>searchform.php : 搜索表单模板</li>
<li><strong>search.php</strong> : 搜索结果模板</li>
</ul>
<p>当然，具体到特定的某款模板，可能不止这些文件，但一般而言，这些文件是每套模板所必备的。</p>
<p><strong>基本条件判断Tag</strong></p>
<ul>
<li><strong>is_home()</strong> : 是否为主页</li>
<li><strong>is_single()</strong> : 是否为内容页(Post)</li>
<li><strong>is_page()</strong> : 是否为内容页(Page)</li>
<li><strong>is_category()</strong> : 是否为Category/Archive页</li>
<li><strong>is_tag()</strong> : 是否为Tag存档页</li>
<li><strong>s_date()</strong> : 是否为指定日期存档页</li>
<li><strong>is_year()</strong> : 是否为指定年份存档页</li>
<li><strong>is_month()</strong> : 是否为指定月份存档页</li>
<li><strong>is_day()</strong> : 是否为指定日存档页</li>
<li><strong>is_time()</strong> : 是否为指定时间存档页</li>
<li><strong>is_archive()</strong> : 是否为存档页</li>
<li><strong>is_search()</strong> : 是否为搜索结果页</li>
<li><strong>s_404()</strong> : 是否为 “HTTP 404: Not Found” 错误页</li>
<li><strong>is_paged()</strong> : 主页/Category/Archive页是否以多页显示</li>
</ul>
<p><strong>Header部分常用到的PHP函数</strong></p>
<ul>
<li><strong>&lt;?php bloginfo (’name’);  ?&gt;</strong> : 博客名称(Title)</li>
<li><strong>&lt;?php bloginfo (’stylesheet_url’);  ?&gt;</strong> : CSS文件路径</li>
<li><strong>&lt;?php bloginfo (’pingback_url’);  ?&gt;</strong> : PingBack Url</li>
<li><strong>&lt;?php bloginfo (’template_url’);  ?&gt;</strong> : 模板文件路径</li>
<li><strong>&lt;?php bloginfo (’version’);  ?&gt;</strong> : WordPress版本</li>
<li><strong>&lt;?php bloginfo (’atom_url’);  ?&gt;</strong> : Atom Url</li>
<li><strong>&lt;?php bloginfo (’rss2_url’);  ?&gt;</strong> : RSS 2.o Url</li>
<li><strong>&lt;?php bloginfo (’url’);  ?&gt;</strong> : 博客 Url</li>
<li><strong>&lt;?php bloginfo (’html_type’);  ?&gt;</strong> : 博客网页Html类型</li>
<li><strong>&lt;?php bloginfo (’charset’);  ?&gt;</strong> : 博客网页编码</li>
<li><strong>&lt;?php bloginfo (’description’);  ?&gt;</strong> : 博客描述</li>
<li><strong>&lt;?php wp_title(); ?&gt;</strong> : 特定内容页(Post/Page)的标题</li>
</ul>
<p><strong>模板常用的PHP函数及命令</strong></p>
<ul>
<li><strong>&lt;?php get_header(); ?&gt;</strong> : 调用Header模板</li>
<li><strong>&lt;?php get_sidebar(); ?&gt;</strong> : 调用Sidebar模板</li>
<li><strong>&lt;?php get_footer(); ?&gt;</strong> : 调用Footer模板</li>
<li><strong>&lt;?php the_content(); ?&gt;</strong> : 显示内容(Post/Page)</li>
<li><strong>&lt;?php the_excerpt(); ?&gt;</strong>: 显示摘要</li>
<li><strong>&lt;?php if(have_posts()) : ?&gt;</strong> : 检查是否存在Post/Page</li>
<li><strong>&lt;?php while(have_posts()) : the_post(); ?&gt;</strong> :  如果存在Post/Page则予以显示</li>
<li><strong>&lt;?php endwhile; ?&gt;</strong> : While 结束</li>
<li><strong>&lt;?php endif; ?&gt;</strong> : If 结束</li>
<li><strong>&lt;?php the_time(’字符串’) ?&gt;</strong> : 显示时间，时间格式由“字符串”参数决定，具体参考<a  href="http://php.net/date" target="_blank"><span class="extlink" >PHP手册</span></a></li>
<li><strong>&lt;?php comments_popup_link(); ?&gt;</strong> : 正文中的留言链接。如果使用  comments_popup_script() ，则留言会在新窗口中打开，反之，则在当前窗口打开</li>
<li><strong>&lt;?php the_title(); ?&gt;</strong> : 内容页(Post/Page)标题</li>
<li><strong>&lt;?php the_permalink() ?&gt;</strong> : 内容页(Post/Page) Url</li>
<li><strong>&lt;?php the_category(’, ‘) ?&gt;</strong> :  特定内容页(Post/Page)所属Category</li>
<li><strong>&lt;?php the_author(); ?&gt;</strong> : 作者</li>
<li><strong>&lt;?php the_ID(); ?&gt;</strong> : 特定内容页(Post/Page) ID</li>
<li><strong>&lt;?php edit_post_link(); ?&gt;</strong> : 如果用户已登录并具有权限，显示编辑链接</li>
<li><strong>&lt;?php get_links_list(); ?&gt;</strong> : 显示Blogroll中的链接</li>
<li><strong>&lt;?php comments_template(); ?&gt;</strong> : 调用留言/回复模板</li>
<li><strong>&lt;?php wp_list_pages(); ?&gt;</strong> : 显示Page列表</li>
<li><strong>&lt;?php wp_list_categories(); ?&gt;</strong> : 显示Categories列表</li>
<li><strong>&lt;?php next_post_link(’ %link ‘); ?&gt;</strong> : 下一篇文章链接</li>
<li><strong>&lt;?php previous_post_link(’%link’); ?&gt;</strong> : 上一篇文章链接</li>
<li><strong>&lt;?php get_calendar(); ?&gt;</strong> : 日历</li>
<li><strong>&lt;?php wp_get_archives() ?&gt;</strong> : 显示内容存档</li>
<li><strong>&lt;?php posts_nav_link(); ?&gt;</strong> : 导航，显示上一篇/下一篇文章链接</li>
<li><strong>&lt;?php include(TEMPLATEPATH . ‘/文件名’); ?&gt;</strong> :  嵌入其他文件，可为定制的模板或其他类型文件</li>
</ul>
<p><strong>与模板相关的其他函数</strong></p>
<ul>
<li><strong>&lt;?php _e(’Message’); ?&gt;</strong> : 输出相应信息</li>
<li><strong>&lt;?php wp_register(); ?&gt;</strong> : 显示注册链接</li>
<li><strong>&lt;?php wp_loginout(); ?&gt; </strong>: 显示登录/注销链接</li>
<li><strong>&lt;!–next page–&gt;</strong> : 将当前内容分页</li>
<li><strong>&lt;!–more–&gt;</strong> : 将当前内容截断，以不在主页/目录页显示全部内容</li>
<li><strong>&lt;?php timer_stop(1); ?&gt;</strong> : 网页加载时间(秒)</li>
<li><strong>&lt;?php echo get_num_queries(); ?&gt;</strong> : 网页加载查询量</li>
</ul>
<p><strong>然后是自己动手的收集</strong></p>
<p><strong></strong></p>
<ul>
<li><strong>&lt;?php get_archives(&#8216;postbypost&#8217;, 10); ?&gt;</strong> 调用最近的10篇日志</li>
<li><strong>&lt;?php<br/>
$rand_posts = get_posts(&#8216;numberposts=10&amp;orderby=rand&#8217;);<br/>
foreach( $rand_posts as $post ) :<br/>
?&gt;<br/>
&lt;li&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;&gt;<br/>
&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;<br/>
&lt;?php endforeach; ?&gt;</strong><strong><code class="php" > </code></strong><code class="php" >随机调用10篇日志</code></li>
<li><strong>&lt;?php the_tags(&#8216;Post Tags :&#8217;, &#8216;, &#8216;, &#8216;&lt;br /&gt;&#8217;); ?&gt; </strong>调用标签<strong><br/>
&lt;?php if (get_the_tags()) the_tags(&#8216;Tags:&#8217;,',&#8217;,'end&#8217;); ?&gt;</strong> 标签存在时调用</li>
<li><strong>&lt;?php wp_tag_cloud(&#8216;smallest=1&amp;largest=9&amp;&#8217;); ?&gt;</strong> 调用标签云</li>
<li><strong>&lt;?php $posts = get_posts( &#8220;category=12&amp;numberposts=4&#8243; ); ?&gt; </strong>获得4篇12分类中的日志<strong><br/>
</strong></li>
</ul>
<p><strong>再来一些更详细的判断函数</strong></p>
<div class="hl-surround" >&lt;?php if(is_single()):?&gt;<br/>
//这里写你想显示的内容，包括函数<br/>
&lt;?php endif;?&gt;</div>
<p>下面是直接来自wordpress.org</p>
<ul>
<li><strong>is_single() </strong>判断是否是具体文章的页面</li>
<li> <strong>is_single(’17′) </strong>判断是否是具体文章（id=17）的页面</li>
<li> <strong>is_single(’Beef Stew’)</strong> 判断是否是具体文章（标题判断）的页面</li>
<li> <strong>is_single(’beef-stew’)</strong> 判断是否是具体文章（slug判断）的页面</li>
<li><strong>comments_open()</strong> 是否留言开启</li>
<li> <strong>pings_open()</strong> 是否开启ping</li>
<li><strong>is_page()</strong> 是否是页面</li>
<li><strong>is_page(’42′)</strong> 同single，id判断，即是否是id为42的页面</li>
<li> <strong>is_page(’About Me’)</strong> title判断</li>
<li> <strong>is_page(’about-me’)</strong> slug判断</li>
<li><strong>is_category()</strong> 是否是分类</li>
<li> <strong>is_category(’6′)</strong> 同single，id判断，即是否是id为6的分类</li>
<li><strong>is_category(’Cheeses’)</strong> title判断</li>
<li> <strong>is_category(’cheeses’)</strong> slug判断</li>
<li> <strong>in_category(’5′)</strong> 判断当前的文章是否属于分类5</li>
<li><strong>is_author()</strong> 将所有的作者的页面显示出来</li>
<li><strong>is_author(’1337′)</strong> 显示author number为1337的页面</li>
<li> <strong>is_author(’Elite Hacker’)</strong> 通过昵称来显示当前作者的页面</li>
<li> <strong>is_author(’elite-hacker’)</strong></li>
<li><strong>is_date()</strong></li>
<li> <strong>is_year()</strong></li>
<li><strong>is_month()</strong></li>
<li> <strong>is_day()</strong></li>
<li> <strong>is_time()</strong></li>
<li><strong>is_archive()</strong> 判断当前是否是归档页面</li>
<li><strong>is_search()</strong> 判断是否是搜索</li>
<li> <strong>is_404()</strong> 判断页面是否404</li>
<li><strong>is_paged()</strong> 判断是否翻页，比如你当前的blog是http://domain.com 显示http://domain.com?paged=2的时候，这个判断将返回真，通过这个函数可以配合is_home来控制某些只能在首页显示的界面，例如：if(is_home() &amp;&amp; !is_paged() )</li>
<li><strong>is_attachment() </strong>When an attachment document to a post or Page is being displayed. An attachment is an image or other file uploaded through the post editor’s upload utility. Attachments can be displayed on their own ‘page’ or template. For more information, see Using Image and File Attachments.</li>
<li><strong>is_feed() </strong>When the site requested is a Syndication. This tag is not typically used by users; it is used internally by WordPress and is available for Plugin Developers.</li>
<li><strong>is_trackback() </strong>When the site requested is WordPress’ hook into its Trackback engine. This tag is not typically used by users; it is used internally by WordPress and is available for Plugin Developers.</li>
</ul>
<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.htm?url=http%3A%2F%2Fwww.iros.me%2Fmy-wordpress-life.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >[置顶] WordPress 主题插件修改 爬行记录（2011.1.19）</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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwordpress-seo-cheat-sheet.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >WordPress SEO 手册【伪】Cheat Sheet Seo for WordPress，PONY口水版，慎入！~</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.htm?url=http%3A%2F%2Fwww.iros.me%2F14th-wordpress-cargo.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >我的又一个新站~ Cargo，数了一下这是自己做的第14个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.htm?url=http%3A%2F%2Fwww.iros.me%2Fwonderful-wordpress-theme-collection-part2.html&#038;from=http%3A%2F%2Fwww.iros.me%2Fwordpress-technical-manual.html">
                        <font size="-1"  color="#666666"  style="line-height: 1.65em; font-size: 12px !important;" >WordPress 主题收集 PART 2</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td align="right" >
            <a  style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" 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>
	标签：<a href="http://www.iros.me/tag/wordpress%e4%bf%ae%e6%94%b9" title="Wordpress修改" rel="tag">Wordpress修改</a>, <a href="http://www.iros.me/tag/%e5%8f%82%e8%80%83" title="参考" rel="tag">参考</a>, <a href="http://www.iros.me/tag/%e6%8a%80%e6%9c%af%e6%89%8b%e5%86%8c" title="技术手册" rel="tag">技术手册</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.iros.me/wordpress-technical-manual.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

