<?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; 参考</title>
	<atom:link href="http://www.iros.me/tag/%e5%8f%82%e8%80%83/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>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>

