<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>等待-放飞梦想 &#187; 模版</title>
	<atom:link href="http://leotheme.cn/tag/%e6%a8%a1%e7%89%88/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Mon, 21 May 2012 09:45:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>WordPress模板常用调用函数</title>
		<link>http://leotheme.cn/wordpress/wordpresscyfunction.html</link>
		<comments>http://leotheme.cn/wordpress/wordpresscyfunction.html#comments</comments>
		<pubDate>Tue, 28 Oct 2008 03:30:24 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[函数]]></category>
		<category><![CDATA[模版]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=130</guid>
		<description><![CDATA[虽然都是些基本的东西,但今天想要用的时候却记不了怎么多.没办法,只好百度一下.SO&#8230; 在这做下笔记,方便以后查询. 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() : [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>虽然都是些基本的东西,但今天想要用的时候却记不了怎么多.没办法,只好百度一下.SO&#8230;<br />
在这做下笔记,方便以后查询.<br />
<strong>WordPress基本模板文件</strong></p>
<p>一套完整的WordPress模板应至少具有如下文件：</p>
<p>style.css : CSS(样式表)文件<br />
<span id="more-130"></span></p>
<p>index.php : 主页模板<br />
archive.php : Archive/Category模板<br />
404.php : Not Found 错误页模板<br />
comments.php : 留言/回复模板<br />
footer.php : Footer模板<br />
header.php : Header模板<br />
sidebar.php : 侧栏模板<br />
page.php : 内容页(Page)模板<br />
single.php : 内容页(Post)模板<br />
searchform.php : 搜索表单模板<br />
search.php : 搜索结果模板</p>
<p>当然，具体到特定的某款模板，可能不止这些文件，但一般而言，这些文件是每套模板所必备的。</p>
<p><!--more--><br />
<strong>基本条件判断Tag</strong></p>
<p>is_home() : 是否为主页<br />
is_single() : 是否为内容页(Post)<br />
is_page() : 是否为内容页(Page)<br />
is_category() : 是否为Category/Archive页<br />
is_tag() : 是否为Tag存档页<br />
is_date() : 是否为指定日期存档页<br />
is_year() : 是否为指定年份存档页<br />
is_month() : 是否为指定月份存档页<br />
is_day() : 是否为指定日存档页<br />
is_time() : 是否为指定时间存档页<br />
is_archive() : 是否为存档页<br />
is_search() : 是否为搜索结果页<br />
is_404() : 是否为 “HTTP 404: Not Found” 错误页<br />
is_paged() : 主页/Category/Archive页是否以多页显示</p>
<p><strong>Header部分常用到的PHP函数</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">name</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 博客名称(Title)<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">stylesheet_url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : CSS文件路径<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">pingback_url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : PingBack Url<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">template_url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 模板文件路径<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">version</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : WordPress版本<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">atom_url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : Atom Url<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">rss2_url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : RSS 2.o Url<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 博客 Url<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">html_type</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 博客网页Html类型<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">charset</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 博客网页编码<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">bloginfo</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">description</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 博客描述<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_title</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 特定内容页(Post/Page)的标题</span></div></div>
<p><strong>模板常用的PHP函数及命令</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_header</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 调用Header模板<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_sidebar</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 调用Sidebar模板<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_footer</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 调用Footer模板<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_content</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示内容(Post/Page)<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 检查是否存在Post/Page<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">while</span><span style="color: Olive;">(</span><span style="color: Blue;">have_posts</span><span style="color: Olive;">())</span><span style="color: Gray;"> : </span><span style="color: Blue;">the_post</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 如果存在Post/Page则予以显示<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">endwhile</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : While 结束<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">endif</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : If 结束<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_time</span><span style="color: Olive;">(</span><span style="color: Gray;">’字符串’</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示时间，时间格式由“字符串”参数决定，具体参考PHP手册<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">comments_popup_link</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 正文中的留言链接。如果使用 comments_popup_script() ，则留言会在新窗口中打开，反之，则在当前窗口打开<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_title</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 内容页(Post/Page)标题<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_permalink</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 内容页(Post/Page) Url<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_category</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">, </span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 特定内容页(Post/Page)所属Category<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_author</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 作者<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">the_ID</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 特定内容页(Post/Page) ID<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">edit_post_link</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 如果用户已登录并具有权限，显示编辑链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_links_list</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示Blogroll中的链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">comments_template</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 调用留言/回复模板<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_pages</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示Page列表<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_list_categories</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示Categories列表<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">next_post_link</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;"> %link </span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 下一篇文章链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">previous_post_link</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">%link</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 上一篇文章链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">get_calendar</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 日历<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_get_archives</span><span style="color: Olive;">()</span><span style="color: Gray;"> </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示内容存档<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">posts_nav_link</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 导航，显示上一篇/下一篇文章链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">include</span><span style="color: Olive;">(</span><span style="color: Blue;">TEMPLATEPATH</span><span style="color: Gray;"> . </span><span style="color: #8b0000;">'</span><span style="color: Red;">/文件名</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 嵌入其他文件，可为定制的模板或其他类型文件</span></div></div>
<p><strong>与模板相关的其他函数</strong></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">_e</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">Message</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 输出相应信息<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_register</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示注册链接<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">wp_loginout</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 显示登录/注销链接<br />&lt;!–next page–&gt; : 将当前内容分页<br />&lt;!–more–&gt; : 将当前内容截断，以不在主页/目录页显示全部内容<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Blue;">timer_stop</span><span style="color: Olive;">(</span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 网页加载时间(秒)<br /></span><span style="color: Blue;">&lt;?php</span><span style="color: Gray;"> </span><span style="color: Green;">echo</span><span style="color: Gray;"> </span><span style="color: Blue;">get_num_queries</span><span style="color: Olive;">()</span><span style="color: Gray;">; </span><span style="color: Blue;">?&gt;</span><span style="color: Gray;"> : 网页加载查询量</span></div></div>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="解决wordpress分页问题" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-query-post-paged.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpresscyfunction.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">解决wordpress分页问题</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2009-07-07 -- <a href="http://leotheme.cn/wordpress/wpfunction/wp_list_pages.html" title="WordPress页面函数：wp_list_pages()">WordPress页面函数：wp_list_pages()</a> (16)<br /><small>模板标签wp_list_pages( )将WordPress页面作为链接显示出来。该模板标签常用于自定义侧边栏或标题，也常用于其他模板中。该模板标签在WordPress 1.5及更新版本中可用。
用...</small></li><li>2009-06-17 -- <a href="http://leotheme.cn/wordpress/5gebuchangyongwordpress-function.html" title="5个不常用的Wordpress函数">5个不常用的Wordpress函数</a> (4)<br /><small>原文：5 Useful WordPress Functions You Didn’t Know Existed
翻译：Epile

在Wordpress的 source code 里有大量实用函...</small></li><li>2011-09-01 -- <a href="http://leotheme.cn/wordpress/wordpress-themes-perfct.html" title="WordPress主题：perfct 1.0">WordPress主题：perfct 1.0</a> (96)<br /><small>已经很久很久没写日志了。更不知道有多久没有发布新主题了！好像已经失去了那种曾经的兴趣和动力，很多时候想写，却又找不到话题。有些技术上的文章想分享。但又懒得编缉。要分析，上代码，做实例。最终只是想想而已...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/%e4%b8%80%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84wordpress%e5%af%bc%e8%88%aa.html" title="一个实用的wordpress导航">一个实用的wordpress导航</a> (0)<br /><small>在Wordpress模板函数库中的“链接函数”（在wp-includesLink-template.php中）有2个函数可以得到前、后文章链接：

    previous_post_link()...</small></li><li>2011-06-07 -- <a href="http://leotheme.cn/wordpress/wordpress-query-post-paged.html" title="解决wordpress分页问题">解决wordpress分页问题</a> (0)<br /><small>这是为解决使用query_post()函数调用某一类文章后引起的分页问题的办法。

query_post()非常有用，可以输出wordpress主循环以外的自定义文章，但是缺点在于覆盖了post变...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpresscyfunction.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

