<?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>任鸟飞网页设计博客-关注网页设计、网站开发、图形图像设计、互联网趣味信息及搜素引擎的IT原创博客 &#187; 模板</title>
	<atom:link href="http://www.renniaofei.com/tag/templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.renniaofei.com</link>
	<description>任鸟飞网页设计博客-关注网页设计、网站开发、图形图像设计、互联网趣味信息及搜素引擎的IT原创博客</description>
	<lastBuildDate>Fri, 30 Jul 2010 10:51:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>免费精美棕色网站模板及源文件</title>
		<link>http://www.renniaofei.com/freebies/a-free-high-quality-website-template/</link>
		<comments>http://www.renniaofei.com/freebies/a-free-high-quality-website-template/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 01:48:46 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[素材]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=482</guid>
		<description><![CDATA[此模板包括 Photoshop 源文件 (PSD)、 HTML文件、CSS 文件、Fonts。


下载链接
]]></description>
			<content:encoded><![CDATA[<p>此模板包括 Photoshop 源文件 (PSD)、 HTML文件、CSS 文件、Fonts。<br />
<span id="more-482"></span><br />
<a href="http://www.templatekingdom.com/Download/action/download/templateId/3955/"><img class="aligncenter size-full wp-image-485" title="fashion CSS template" src="http://www.renniaofei.com/wp-content/uploads/2010/01/fashion-CSS-template.gif" alt="" width="430" height="514" /></a></p>
<p><a href="http://www.templatekingdom.com/Download/action/download/templateId/3955/">下载链接</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/freebies/a-free-high-quality-website-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress时间日期函数-Date &amp; Time Template Tags</title>
		<link>http://www.renniaofei.com/code/wordpress-date-time-template-tags/</link>
		<comments>http://www.renniaofei.com/code/wordpress-date-time-template-tags/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 03:14:48 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[wordpress 主题]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=330</guid>
		<description><![CDATA[在制作Wordpress主题时，其中很重要的一块就是如何定义日期时间的格式样式，须熟练掌握并灵活运用Wordpress日期时间函数。

&#60;?php the_date_xml(); ?&#62; 在文章中以YYYY-MM-DD格式显示日期， 例如(2004-09-24) ，无参数。
&#60;?php the_date(&#8216;format&#8217;, &#8216;before&#8217;, &#8216;after&#8217;, echo); ?&#62;&#62;  文章日期。
参数说明：

format ：日期格式，默认值为你在Wordpress中设置的日期时间格式。
例如：&#60;?php the_date(&#8216;n-j-Y&#8217;, &#8217;before&#8217;, &#8217;after&#8217;, echo); ?&#62;。
before：日期前缀，默认值为空。
例如：&#60;?php the_date(&#8216;format&#8217;, &#8217;&#38;raquo&#8217;, &#8217;after&#8217;, echo); ?&#62;。
after：日期后缀，默认值为空。
例如：&#60;?php the_date(&#8216;format&#8217;, &#8217;&#38;raquo&#8217;, &#8217;after&#8217;, echo); ?&#62;。
echo：true&#124;false ，如果echo=true的话就显示日期，否则返回PHP使用的日期。
例如：&#60;?php the_date(&#8216;format&#8217;, &#8217;before&#8217;, &#8217;after&#8217;, TRUE); ?&#62;。

&#60;?php the_time(&#8216;d&#8217;); ?&#62; 显示文章发表的时间。
参数说明：

d：发表文章的时间格式。
 例如：&#60;?php the_time(&#8216;H:i:s&#8217;); ?&#62;。

&#60;?php the_modified_date(&#8216;d&#8217;); ?&#62;  显示文章最后修改的日期，默认值为你在Wordpress中设置的日期时间格式。
参数说明：

d：日期格式。
例如：&#60;?php the_modified_date(&#8216;n-j-Y&#8217;); ?&#62;。

&#60;?php the_modified_time(&#8216;d&#8217;); ?&#62; 显示文章最后修改的时间，默认值为你在Wordpress中设置的日期时间格式。
参数说明：

d：时间格式。
例如：&#60;?php the_modified_time(&#8216;H:i:s&#8217;); ?&#62;。

&#60;?php get_the_time(&#8216;format&#8217;); ?&#62;  返回供PHP使用的当前文章的时间，注：不会在文章中显示出来。
参数说明:

format:时间格式，默认值为你在Wordpress中设置的日期时间格式。
例如：&#60;?php get_the_time(); ?&#62;。

&#60;?php single_month_title(&#8216;prefix&#8217;, display) ?&#62; 返回当前文章发表的月份及年份，此函数只能在按日期归档的档案页面使用。
参数说明：

prefix：前缀。
例如：&#60;?php single_month_title(&#8216;&#38;bull&#8217;, display) ?&#62;。
display：true &#124; false。如果为true，则显示标题，否则返回供php使用的标题。
例如：&#60;?php single_month_title(&#8216;prefix&#8217;, FALSE) ?&#62;。

&#60;?php get_calendar(); ?&#62; 返回供PHP使用的当前文章的时间，注：不能在页面中显示出来。
参数说明：

initial：true &#124; false，如果为true，则将天（day）缩写为一个字母，例如Sunday将会缩写为&#8221;S&#8221;， 否则会根据本地时间来缩写，例如&#8221;Sunday&#8221;可能会缩写为 &#8220;Sun&#8221;。
例如：&#60;?php get_calendar(false); ?&#62;

]]></description>
			<content:encoded><![CDATA[<p>在制作Wordpress主题时，其中很重要的一块就是如何定义日期时间的格式样式，须熟练掌握并灵活运用Wordpress日期时间函数。<br />
<span id="more-330"></span></p>
<p><strong>&lt;?php the_date_xml(); ?&gt;</strong> 在文章中以YYYY-MM-DD格式显示日期， 例如(2004-09-24) ，无参数。</p>
<p><strong>&lt;?php the_date(&#8216;format&#8217;, &#8216;before&#8217;, &#8216;after&#8217;, echo); ?&gt;&gt;</strong>  文章日期。</p>
<p>参数说明：</p>
<ul>
<li><strong>format</strong> ：日期格式，默认值为你在Wordpress中设置的日期时间格式。<br />
例如：&lt;?php the_date(&#8216;n-j-Y&#8217;, &#8217;before&#8217;, &#8217;after&#8217;, echo); ?&gt;。</li>
<li><strong>before</strong>：日期前缀，默认值为空。<br />
例如：&lt;?php the_date(&#8216;format&#8217;, &#8217;&amp;raquo&#8217;, &#8217;after&#8217;, echo); ?&gt;。</li>
<li><strong>after</strong>：日期后缀，默认值为空。<br />
例如：&lt;?php the_date(&#8216;format&#8217;, &#8217;&amp;raquo&#8217;, &#8217;after&#8217;, echo); ?&gt;。</li>
<li><strong>echo</strong>：true|false ，如果echo=true的话就显示日期，否则返回PHP使用的日期。<br />
例如：&lt;?php the_date(&#8216;format&#8217;, &#8217;before&#8217;, &#8217;after&#8217;, TRUE); ?&gt;。</li>
</ul>
<p><strong>&lt;?php the_time(&#8216;d&#8217;); ?&gt;</strong> 显示文章发表的时间。</p>
<p>参数说明：</p>
<ul>
<li>d：发表文章的时间格式。<br />
 例如：&lt;?php the_time(&#8216;H:i:s&#8217;); ?&gt;。</li>
</ul>
<p><strong>&lt;?php the_modified_date(&#8216;d&#8217;); ?&gt;</strong>  显示文章最后修改的日期，默认值为你在Wordpress中设置的日期时间格式。</p>
<p>参数说明：</p>
<ul>
<li>d：日期格式。<br />
例如：&lt;?php the_modified_date(&#8216;n-j-Y&#8217;); ?&gt;。</li>
</ul>
<p>&lt;?php the_modified_time(&#8216;d&#8217;); ?&gt; 显示文章最后修改的时间，默认值为你在Wordpress中设置的日期时间格式。</p>
<p>参数说明：</p>
<ul>
<li>d：时间格式。<br />
例如：&lt;?php the_modified_time(&#8216;H:i:s&#8217;); ?&gt;。</li>
</ul>
<p><strong>&lt;?php get_the_time(&#8216;format&#8217;); ?&gt;</strong>  返回<strong>供PHP使用</strong>的当前文章的时间，注：不会在文章中显示出来。</p>
<p>参数说明:</p>
<ul>
<li>format:时间格式，默认值为你在Wordpress中设置的日期时间格式。<br />
例如：&lt;?php get_the_time(); ?&gt;。</li>
</ul>
<p>&lt;?php single_month_title(&#8216;prefix&#8217;, display) ?&gt; 返回当前文章发表的月份及年份，此函数只能在按日期归档的档案页面使用。</p>
<p>参数说明：</p>
<ul>
<li>prefix：前缀。<br />
例如：&lt;?php single_month_title(&#8216;&amp;bull&#8217;, display) ?&gt;。</li>
<li>display：true | false。如果为true，则显示标题，否则返回供php使用的标题。<br />
例如：&lt;?php single_month_title(&#8216;prefix&#8217;, FALSE) ?&gt;。</li>
</ul>
<p>&lt;?php get_calendar(); ?&gt; 返回供PHP使用的当前文章的时间，注：不能在页面中显示出来。</p>
<p>参数说明：</p>
<ul>
<li>initial：true | false，如果为true，则将天（day）缩写为一个字母，例如Sunday将会缩写为&#8221;S&#8221;， 否则会根据本地时间来缩写，例如&#8221;Sunday&#8221;可能会缩写为 &#8220;Sun&#8221;。<br />
例如：&lt;?php get_calendar(false); ?&gt;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/code/wordpress-date-time-template-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress如何定义指定文章的样式</title>
		<link>http://www.renniaofei.com/code/how-to-style-posts-individually/</link>
		<comments>http://www.renniaofei.com/code/how-to-style-posts-individually/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 15:18:06 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=229</guid>
		<description><![CDATA[通过post_class() 函数及post ID属性来定义指定文章或某些类别的文章的样式。

 通过修改&#60;div &#60;?php post_class() ?&#62; id=&#8220;post-&#60;?php the_ID(); ?&#62;&#8221;&#62; ，来实现定义指定文章或某些类别文章的样式。
打开single.php，将其中有关文章内容部分的代码修改成如下形式：
&#60;?php if (have_posts()) : ?&#62;
  &#60;?php while (have_posts()) : the_post(); ?&#62;
  &#60;div &#60;?php post_class() ?&#62; id="post-&#60;?php the_ID(); ?&#62;"&#62;
  &#60;h3&#62;&#60;a href="&#60;?php the_permalink() ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/h3&#62;
  &#60;?php the_content(); ?&#62;
  &#60;/div&#62;
  &#60;?php endwhile; else: ?&#62;
  &#60;?php _e('Sorry, no posts matched your criteria.'); ?&#62;
  &#60;?php endif; ?&#62; 
 
主要是第三行代码部分，添加&#60;?php post_class() ?&#62; 及&#60;?php the_ID(); ?&#62; 。
通过上述代码后，我们察看具体文章的源代码就会发现如下样式的代码：
&#60;div [...]]]></description>
			<content:encoded><![CDATA[<p>通过<strong>post_class()</strong> 函数及<strong>post ID</strong>属性来定义指定文章或某些类别的文章的样式。<br />
<span id="more-229"></span><br />
 通过修改<span>&lt;div &lt;?php post_class() ?&gt; id=</span><span>&#8220;post-&lt;?php the_ID(); ?&gt;&#8221;</span><span>&gt; ，来实现定义指定文章或某些类别文章的样式。</span></p>
<p>打开single.php，将其中有关文章内容部分的代码修改成如下形式：</p>
<pre><code>&lt;?php if (have_posts()) : ?&gt;
  &lt;?php while (have_posts()) : the_post(); ?&gt;
  &lt;div &lt;?php post_class() ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt;
  &lt;h3&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
  &lt;?php the_content(); ?&gt;
  &lt;/div&gt;
  &lt;?php endwhile; else: ?&gt;
  &lt;?php _e('Sorry, no posts matched your criteria.'); ?&gt;
  &lt;?php endif; ?&gt; </code></pre>
<p> </p>
<p>主要是第三行代码部分，添加&lt;?php post_class() ?&gt; 及&lt;?php the_ID(); ?&gt;<span> </span>。<br />
通过上述代码后，我们察看具体文章的源代码就会发现如下样式的代码：</p>
<p>&lt;div class=&#8221;post sticky hentry category-design tag-news tag-wordpress tag-markup&#8221;  id=&#8221;post-23&#8243;&gt;。</p>
<p>如果需要定义指定类别的的文章样式，只需定义下列类：</p>
<p> .post<br />
 .hentry<br />
 .sticky<br />
 .category-misc<br />
 .tag-news<br />
 .tag-wordpress<br />
 .tag-markup</p>
<p>如果需定义指定某篇文章的样式，只需定义post-ID即可。</p>
<p>例如：</p>
<pre><code>#post-23{
 background:#aaa;
	}  </code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/code/how-to-style-posts-individually/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress评论模板函数集-Comment Template Tags</title>
		<link>http://www.renniaofei.com/code/wordpress-function-comment-template-tags/</link>
		<comments>http://www.renniaofei.com/code/wordpress-function-comment-template-tags/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 12:14:48 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[wordpress 主题]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=136</guid>
		<description><![CDATA[网站的内容大多都对读者开放评论，读者与作者的沟通和交流更直接更快捷，提高了用户的体验，现整理评论模板相关函数如下。

&#60;?php comments_number(&#8216;zero&#8217;, &#8216;one&#8217;, &#8216;more&#8217;, &#8216;number&#8217;); ?&#62; ，评论数量（Comment Count）
显示文章回复, Trackbacks, Pingbacks 总数。
参数说明：

zero:：string类型参数，无评论时显示的文本。
&#60;?php comments_number(&#8216;No Comments&#8217;, &#8217;one&#8217;, &#8217;more&#8217;, &#8217;number&#8217;); ?&#62;
one：string类型参数，1条评论时显示的文本。
&#60;?php comments_number(&#8216;zero&#8217;, &#8217;1 Comment&#8217;, &#8217;more&#8217;, &#8217;number&#8217;); ?&#62;
more：string类型参数，多条评论时显示的文本样式。% 代表评论数量。 
&#60;?php comments_number(&#8216;zero&#8217;, &#8217;one&#8217;, &#8217;% Comments&#8217;, &#8217;number&#8217;); ?&#62;
number：Interger类型参数，指定显示具体个数的评论。
&#60;?php comments_number(&#8216;zero&#8217;, &#8217;one&#8217;, &#8217;more&#8217;, &#8217;5&#8242;); ?&#62;

&#60;?php comments_link(); ?&#62; ，指向文章评论页面的链接（Link to post comments），无参数。
&#60;?php comments_rss_link(&#8216;text&#8217;, &#8216;file&#8217;); ?&#62; ，文章评论RSS FEED 链接。
参数说明：

text：评论 RSS链接文本，默认值为Comment RSS。
&#60;?php comments_rss_link(&#8216;RSS&#8217;, &#8217;file&#8217;); ?&#62;
file：链接到具体文件，默认值为 wp-commentsrss2.php 。
&#60;?php comments_rss_link(&#8216;text&#8217;, &#8217;wp-commentsrss2.php&#8217;); ?&#62;

&#60;?php comments_popup_script(width, height); ?&#62; ，在评论弹出窗口中输出Javascript代码，此代码通常放置在&#60;head&#62;部分。
参数说明：

width：弹出窗口的宽度，默认值为400px。
&#60;?php comments_popup_script(300, height); ?&#62;
height：弹出窗口高度，默认值为300px。
&#60;?php comments_popup_script(width, 300); ?&#62;

&#60;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'more&#8217;,'CSSclass&#8217;,'none&#8217;); ?&#62;，弹出窗口链接（Link  to Pop-Up Window）。在comments_popup_script()开启的情况下，会显示一个指向文章评论弹出窗口的链接，否则显示一个指向评论页面的链接，此代码只能在循环（loop）中使用，而且不能用在is_single() 或者is_page() 为 true情况下。
参数说明：

zero：string类型参数，无评论时显示的文本样式。
&#60;?php comments_popup_link (&#8216;No Comments&#8217;,'one&#8217;,'more&#8217;,'CSSclass&#8217;); ?&#62;
one：string类型参数，只有一条评论时显示的文本样式。
&#60;?php comments_popup_link (&#8216;zero&#8217;,'1 Comment&#8217;,'more&#8217;,'CSSclass&#8217;); ?&#62;
more：string类型参数，多条平时时显示的文本样式。
&#60;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'% Comments&#8217;,'CSSclass&#8217;); ?&#62;
CSSclass：链接样式。
&#60;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'more&#8217;,'popup-link&#8217;); ?&#62;
none：评论关闭。
&#60;?php comments_popup_link (&#8216;none&#8217;); ?&#62;

&#60;?php comment_ID(); ?&#62; ，评论ID（Comment ID），无参数，只能用在Loop循环或Comment Loop循环中。
&#60;?php comment_author(); ?&#62;，评论作者，无参数，只能用在Loop循环或Comment Loop循环中。
&#60;?php comment_author_IP(); ?&#62; ，评论作者的IP，无参数，只能用在Loop循环或Comment Loop循环中。
&#60;?php comment_author_email(); ?&#62; ，评论作者的Email，无参数，只能用在Loop循环或Comment Loop循环中。
&#60;?php comment_author_url(); ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>网站的内容大多都对读者开放评论，读者与作者的沟通和交流更直接更快捷，提高了用户的体验，现整理评论模板相关函数如下。<br />
<span id="more-136"></span><br />
<strong>&lt;?php comments_number(&#8216;zero&#8217;, &#8216;one&#8217;, &#8216;more&#8217;, &#8216;number&#8217;); ?&gt;</strong> ，评论数量（Comment Count）</p>
<p>显示文章回复, Trackbacks, Pingbacks 总数。</p>
<p>参数说明：</p>
<ul>
<li>zero:：string类型参数，无评论时显示的文本。<br />
&lt;?php comments_number(&#8216;No Comments&#8217;, &#8217;one&#8217;, &#8217;more&#8217;, &#8217;number&#8217;); ?&gt;</li>
<li>one：string类型参数，1条评论时显示的文本。<br />
&lt;?php comments_number(&#8216;zero&#8217;, &#8217;1 Comment&#8217;, &#8217;more&#8217;, &#8217;number&#8217;); ?&gt;</li>
<li>more：string类型参数，多条评论时显示的文本样式。% 代表评论数量。 <br />
&lt;?php comments_number(&#8216;zero&#8217;, &#8217;one&#8217;, &#8217;% Comments&#8217;, &#8217;number&#8217;); ?&gt;</li>
<li>number：Interger类型参数，指定显示具体个数的评论。<br />
&lt;?php comments_number(&#8216;zero&#8217;, &#8217;one&#8217;, &#8217;more&#8217;, &#8217;5&#8242;); ?&gt;</li>
</ul>
<p><strong>&lt;?php comments_link(); ?&gt;</strong> ，指向文章评论页面的链接（Link to post comments），无参数。</p>
<p><strong>&lt;?php comments_rss_link(&#8216;text&#8217;, &#8216;file&#8217;); ?&gt;</strong> ，文章评论RSS FEED 链接。</p>
<p>参数说明：</p>
<ul>
<li>text：评论 RSS链接文本，默认值为Comment RSS。<br />
&lt;?php comments_rss_link(&#8216;RSS&#8217;, &#8217;file&#8217;); ?&gt;</li>
<li>file：链接到具体文件，默认值为 wp-commentsrss2.php 。<br />
&lt;?php comments_rss_link(&#8216;text&#8217;, &#8217;wp-commentsrss2.php&#8217;); ?&gt;</li>
</ul>
<p><strong>&lt;?php comments_popup_script(width, height); ?&gt;</strong> ，在评论弹出窗口中输出Javascript代码，此代码通常放置在&lt;head&gt;部分。</p>
<p>参数说明：</p>
<ul>
<li>width：弹出窗口的宽度，默认值为400px。<br />
&lt;?php comments_popup_script(300, height); ?&gt;</li>
<li>height：弹出窗口高度，默认值为300px。<br />
&lt;?php comments_popup_script(width, 300); ?&gt;</li>
</ul>
<p><strong>&lt;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'more&#8217;,'CSSclass&#8217;,'none&#8217;); ?&gt;</strong>，弹出窗口链接（Link  to Pop-Up Window）。在comments_popup_script()开启的情况下，会显示一个指向文章评论弹出窗口的链接，否则显示一个指向评论页面的链接，此代码只能在循环（loop）中使用，而且不能用在is_single() 或者is_page() 为 true情况下。</p>
<p>参数说明：</p>
<ul>
<li>zero：string类型参数，无评论时显示的文本样式。<br />
&lt;?php comments_popup_link (&#8216;No Comments&#8217;,'one&#8217;,'more&#8217;,'CSSclass&#8217;); ?&gt;</li>
<li>one：string类型参数，只有一条评论时显示的文本样式。<br />
&lt;?php comments_popup_link (&#8216;zero&#8217;,'1 Comment&#8217;,'more&#8217;,'CSSclass&#8217;); ?&gt;</li>
<li>more：string类型参数，多条平时时显示的文本样式。<br />
&lt;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'% Comments&#8217;,'CSSclass&#8217;); ?&gt;</li>
<li>CSSclass：链接样式。<br />
&lt;?php comments_popup_link (&#8216;zero&#8217;,'one&#8217;,'more&#8217;,'popup-link&#8217;); ?&gt;</li>
<li>none：评论关闭。<br />
&lt;?php comments_popup_link (&#8216;none&#8217;); ?&gt;</li>
</ul>
<p><strong>&lt;?php comment_ID(); ?&gt;</strong> ，评论ID（Comment ID），无参数，只能用在Loop循环或Comment Loop循环中。</p>
<p><strong>&lt;?php comment_author(); ?&gt;，</strong>评论作者，无参数，只能用在Loop循环或Comment Loop循环中。</p>
<p><strong>&lt;?php comment_author_IP(); ?&gt;</strong> ，评论作者的IP，无参数，只能用在Loop循环或Comment Loop循环中。</p>
<p><strong>&lt;?php comment_author_email(); ?&gt;</strong> ，评论作者的Email，无参数，只能用在Loop循环或Comment Loop循环中。</p>
<p><strong>&lt;?php comment_author_url(); ?&gt;</strong> ，显示评论作者的URL文本（不是链接），无参数，只能用在Loop循环或Comment Loop循环中。</p>
<p><strong>&lt;?php comment_author_email_link(&#8216;linktext&#8217;, &#8216;before&#8217;, &#8216;after&#8217;); ?&gt;</strong> ，评论作者的Email链接，只能用在Loop循环或Comment Loop循环中。</p>
<p>参数说明：</p>
<ul>
<li>linktext：Email 链接文本，默认为邮箱地址。<br />
&lt;?php comment_author_email_link(&#8216;Email&#8217;, &#8217;before&#8217;, &#8217;after&#8217;); ?&gt;。</li>
<li>before：链接文本前缀。<br />
&lt;?php comment_author_email_link(&#8216;linktext&#8217;, &#8217;&amp;raquo;&#8217;, &#8217;after&#8217;); ?&gt;。</li>
<li>after：链接文本后缀。<br />
&lt;?php comment_author_email_link(&#8216;linktext&#8217;, &#8217;before&#8217;, &#8217;&amp;laquo;&#8217;); ?&gt;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/code/wordpress-function-comment-template-tags/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wordpress目录链接列表函数-Category Link List</title>
		<link>http://www.renniaofei.com/code/wordpress-function-category-link-list/</link>
		<comments>http://www.renniaofei.com/code/wordpress-function-category-link-list/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 04:10:55 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=101</guid>
		<description><![CDATA[Wordpress目录链接列表函数（wp_list_categories(); ）以链接的形式显示目录。 当点击目录链接时就会打开相应目录的页面。

参数说明：

show_option_all
当目录样式设置为列表时，且此参数值非空，则会显示一个指向所有目录的链接，默认不显示，参数值类型为 string。
&#60;?php wp_list_categories(&#8217;show_option_all=&#8217;); ?&#62;
orderby 根据某个字段进行排序，参数值 ID &#124; name &#124; count。
 &#60;?php wp_list_categories(&#8216;orderby=count&#8217;); ?&#62;
order  排序方式，升序或降序，参数值：ASC &#124; DESC。
&#60;?php wp_list_categories(&#8216;order=DESC&#8217;); ?&#62;
show_last_updated 目录列表中是否显示最新更新的时间，参数值 1 &#124; 0。
&#60;?php wp_list_categories(&#8217;show_last_updated=1&#8242;); ?&#62;
style 目录显示样式，
&#60;?php wp_list_categories(&#8217;style=none&#8217;); ?&#62;
show_count 显示文章数量，参数值 1 &#124; 0。
&#60;?php wp_list_categories(&#8217;show_count=1&#8242;); ?&#62;
hide_empty 隐藏空目录，参数值 1 &#124; 0。
&#60;?php wp_list_categories(&#8216;hide_empty=0&#8242;); ?&#62;
use_desc_for_title 是否在目录链接的 title属性中添加目录描述，参数值 1 &#124; 0。
child_of  显示指定目录的子目录链接，参数值类型Interger。
&#60;?php wp_list_categories(&#8216;child_of=5&#8242;); ?&#62;
feed 显示指向目录rss-2 feed的链接，并显示链接文本，参数类型 String
&#60;?php wp_list_categories(&#8216;feed=RSS&#8217;); ?&#62;
feed_image 设定RSS的图标，参数类型 String。
&#60;?php wp_list_categories(&#8216;feed_images=images/picture.jpg&#8217;); ?&#62;
exclude 排除指定的目录，参数类型 Interger。
&#60;?php wp_list_categories(&#8216;exclude=5&#8242;); ?&#62;
include 只显示以逗号分隔的目录ID为参数的目录链接。
&#60;?php wp_list_categories(&#8216;include=5&#8242;); ?&#62;
heirarchial  以内部列表项或嵌入的方式显示子目录，参数值 1 &#124; 0。
&#60;?php wp_list_categories(&#8216;heirarchial=0&#8242;); ?&#62;
title_li 在目录列表项外面显示目录标题，默认值 &#8220;_Categories&#8221;，如果为空则外面不显示目录标题，参数值类型 String。
&#60;?php wp_list_categories(&#8216;titleli=_cats&#8217;); ?&#62;
number 限制显示目录的数量，参数类型 Interger，默认为不限制。
&#60;?php wp_list_categories(&#8216;number=7&#8242;); ?&#62;
echo 输入结果或保存为变量的形式，参数值 1 &#124; 0 。
&#60;?php wp_list_categories(&#8216;echo=0&#8242;); ?&#62;
depth 目录列表项的层级，参数类型 Interger [...]]]></description>
			<content:encoded><![CDATA[<p>Wordpress目录链接列表函数（wp_list_categories(); ）以链接的形式显示目录。 当点击目录链接时就会打开相应目录的页面。<br />
<span id="more-101"></span><br />
参数说明：</p>
<ol>
<li><strong>show_option_all<br />
</strong>当目录样式设置为列表时，且此参数值非空，则会显示一个指向所有目录的链接，默认不显示，参数值类型为 string。<br />
&lt;?php wp_list_categories(&#8217;show_option_all=&#8217;); ?&gt;</li>
<li><strong>orderby</strong> 根据某个字段进行排序，参数值 ID | name | count。<br />
 &lt;?php wp_list_categories(&#8216;orderby=count&#8217;); ?&gt;</li>
<li><strong>order</strong>  排序方式，升序或降序，参数值：ASC<strong> | </strong>DESC。<br />
&lt;?php wp_list_categories(&#8216;order=DESC&#8217;); ?&gt;</li>
<li><strong>show_last_updated</strong> 目录列表中是否显示最新更新的时间，参数值 1 | 0。<br />
&lt;?php wp_list_categories(&#8217;show_last_updated=1&#8242;); ?&gt;</li>
<li><strong>style</strong> 目录显示样式，<br />
&lt;?php wp_list_categories(&#8217;style=none&#8217;); ?&gt;</li>
<li><strong>show_count</strong> 显示文章数量，参数值 1 | 0。<br />
&lt;?php wp_list_categories(&#8217;show_count=1&#8242;); ?&gt;</li>
<li><strong>hide_empty</strong> 隐藏空目录，参数值 1 | 0。<br />
&lt;?php wp_list_categories(&#8216;hide_empty=0&#8242;); ?&gt;</li>
<li><strong>use_desc_for_title</strong> 是否在目录链接的 title属性中添加目录描述，参数值 1 | 0。</li>
<li><strong>child_of</strong>  显示指定目录的子目录链接，参数值类型Interger。<br />
&lt;?php wp_list_categories(&#8216;child_of=5&#8242;); ?&gt;</li>
<li><strong>feed</strong> 显示指向目录rss-2 feed的链接，并显示链接文本，参数类型 String<br />
&lt;?php wp_list_categories(&#8216;feed=RSS&#8217;); ?&gt;</li>
<li><strong>feed_image</strong> 设定RSS的图标，参数类型 String。<br />
&lt;?php wp_list_categories(&#8216;feed_images=images/picture.jpg&#8217;); ?&gt;</li>
<li><strong>exclude</strong> 排除指定的目录，参数类型 Interger。<br />
&lt;?php wp_list_categories(&#8216;exclude=5&#8242;); ?&gt;</li>
<li><strong>include</strong> 只显示以逗号分隔的目录ID为参数的目录链接。<br />
&lt;?php wp_list_categories(&#8216;include=5&#8242;); ?&gt;</li>
<li><strong>heirarchial</strong>  以内部列表项或嵌入的方式显示子目录，参数值 1 | 0。<br />
&lt;?php wp_list_categories(&#8216;heirarchial=0&#8242;); ?&gt;</li>
<li><strong>title_li</strong> 在目录列表项外面显示目录标题，默认值 &#8220;_Categories&#8221;，如果为空则外面不显示目录标题，参数值类型 String。<br />
&lt;?php wp_list_categories(&#8216;titleli=_cats&#8217;); ?&gt;</li>
<li><strong>number</strong> 限制显示目录的数量，参数类型 Interger，默认为不限制。<br />
&lt;?php wp_list_categories(&#8216;number=7&#8242;); ?&gt;</li>
<li><strong>echo</strong> 输入结果或保存为变量的形式，参数值 1 | 0 。<br />
&lt;?php wp_list_categories(&#8216;echo=0&#8242;); ?&gt;</li>
<li><strong>depth</strong> 目录列表项的层级，参数类型 Interger ，参数值 0 | -1 | 1 | n。<br />
depth=0 为默认值，显示所有目录项（包括所有子目录）；<br />
depth=-1 以窗体（覆盖默认的层次结构）的形式显示所有目录（无缩进）；<br />
depth=1 只显示顶级目录链接；<br />
depth=n 根据参数值n显示目录层级。<br />
&lt;?php wp_dropdown_categories(&#8216;depth=n&#8217;); ?&gt;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/code/wordpress-function-category-link-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress函数讲解-Category Template Tags</title>
		<link>http://www.renniaofei.com/design/wordpress-function-category-template-tags/</link>
		<comments>http://www.renniaofei.com/design/wordpress-function-category-template-tags/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 12:20:56 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[设计]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=97</guid>
		<description><![CDATA[为了更好更快的设计一个优秀Wordpress主题,网页设计师必须尽量掌握Wordpress中常用的函数,下面整理列出了目录模板函数列表，供大家参考。

目录模板函数集 （Category Template Tags）

获取文章目录链接（Post Category）函数-&#60;?php the_category(&#8216;arguments);?&#62;，多参数。
参数说明：
分隔符（seperator），目录之间的分隔符号，可以为文字或字符，默认情况下按照无序列表的形式显示。
例子：
&#60;?php the_category(&#8217;seperator=&#38;bull;&#8217;); ?&#62;
层级参数（parents），如何显示子目录链接，属性值有single和multiple。
例子：
&#60;?php the_category(&#8216;parents=multiple&#8217;); ?&#62;
在RSS中显示文章的发表目录（Post Category in RSS Format）函数-&#60;?php the_category_rss(&#8216;arguments&#8217;); ?&#62;。
参数说明：
类型（type）：Feed显示类型。
例子：
&#60;?php the_category_rss(&#8216;type=rss&#8217;); ?&#62;
获取页面目录名称函数（Page Category Title）函数-&#60;?php single_cat_title(&#8216;prefix&#8217;,'display&#8217;); ?&#62;,显示或返回当前页面所属目录名称。
参数说明：
前缀（prefix），目录名称前缀，默认值：不显示任何内容。
例子：
&#60;?php single_cat_title(&#8216;&#38;bull;&#8217;,'display&#8217;); ?&#62;
显示目录名称参数（display）。属性值 TRUE &#124; FALSE
例子：
&#60;?php single_cat_title(&#8216;prefix&#8217;,'true&#8217;); ?&#62;
获取当前页目录描述（Category Description）函数&#60;?php category_description(category); ?&#62;。
参数说明：
目录ID（category），返回目录描述,参数值类型为整数
例子：
&#60;?php category_description(&#8216;2&#8242;); ?&#62;
显示下来菜单形式的目录列表（Category Dropdown）函数-&#60;?php wp_dropdown_categories(&#8216;argument&#8217;); ?&#62;
参数说明：
显示所有选项（show_option_all）
例子：
&#60;?php wp_dropdown_categories(&#8217;show_option_all=&#8217;) ;?&#62;
允许选择类别为“无”（show_option_none）
例子：
&#60;?php wp_dropdown_categories(&#8217;show_option_none=&#8217;); ?&#62;
排列字段（orderby）参数值 ID &#124; name
例子：
&#60;?php wp_dropdown_categories(&#8216;orderby=name&#8217;); ?&#62;
排序次序（order）参数值 ASC &#124; DESC
例子：
&#60;?php wp_dropdown_categories(&#8216;order=DESC&#8217;); ?&#62;
是否显示最后更新日期（show_last_update）属性值 1 &#124; 0
例子：&#60;?php wp_dropdown_categories(&#8217;show_last_update=1&#8242;); ?&#62;
是否显示目录内文章数量（show_count）属性值 1 &#124; 0
例子：&#60;?php wp_dropdown_categories(&#8217;show_count=1&#8242;); ?&#62;
是否隐藏空目录（hide_empty）属性值 1 &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>为了更好更快的设计一个优秀Wordpress主题,网页设计师必须尽量掌握Wordpress中常用的函数,下面整理列出了目录模板函数列表，供大家参考。<br />
<span id="more-97"></span><br />
<strong>目录模板函数集 （Category Template Tags）</strong></p>
<ol>
<li>获取文章目录链接（Post Category）函数-&lt;?php the_category(&#8216;arguments);?&gt;，多参数。<br />
参数说明：<br />
<strong>分隔符（seperator），目录之间的分隔符号，可以为文字或字符，默认情况下按照无序列表的形式显示。<br />
</strong>例子：<br />
&lt;?php the_category(&#8217;seperator=&amp;bull;&#8217;); ?&gt;<br />
<strong>层级参数（parents），如何显示子目录链接，属性值有single和multiple。</strong><br />
例子：<br />
&lt;?php the_category(&#8216;parents=multiple&#8217;); ?&gt;</li>
<li>在RSS中显示文章的发表目录（Post Category in RSS Format）函数-&lt;?php the_category_rss(&#8216;arguments&#8217;); ?&gt;。<br />
参数说明：<br />
<strong>类型（type）：Feed显示类型。<br />
</strong>例子：<br />
&lt;?php the_category_rss(&#8216;type=rss&#8217;); ?&gt;</li>
<li>获取页面目录名称函数（Page Category Title）函数-&lt;?php single_cat_title(&#8216;prefix&#8217;,'display&#8217;); ?&gt;,显示或返回当前页面所属目录名称。<br />
参数说明：<br />
<strong>前缀（prefix），目录名称前缀，默认值：不显示任何内容。</strong><br />
例子：<br />
&lt;?php single_cat_title(&#8216;&amp;bull;&#8217;,'display&#8217;); ?&gt;<br />
<strong>显示目录名称参数（display）。属性值 TRUE | FALSE</strong><br />
例子：<br />
&lt;?php single_cat_title(&#8216;prefix&#8217;,'true&#8217;); ?&gt;</li>
<li>获取当前页目录描述（Category Description）函数&lt;?php category_description(category); ?&gt;。<br />
参数说明：<br />
<strong>目录ID（category），返回目录描述,参数值类型为整数</strong><br />
例子：<br />
&lt;?php category_description(&#8216;2&#8242;); ?&gt;</li>
<li>显示下来菜单形式的目录列表（Category Dropdown）函数-&lt;?php wp_dropdown_categories(&#8216;argument&#8217;); ?&gt;<br />
参数说明：<br />
<strong>显示所有选项（show_option_all）<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8217;show_option_all=&#8217;) ;?&gt;<br />
<strong>允许选择类别为“无”（show_option_none）</strong><br />
例子：<br />
&lt;?php wp_dropdown_categories(&#8217;show_option_none=&#8217;); ?&gt;<br />
<strong>排列字段（orderby）参数值 ID | name<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8216;orderby=name&#8217;); ?&gt;<br />
<strong>排序次序（order）参数值 ASC | DESC<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8216;order=DESC&#8217;); ?&gt;<br />
<strong>是否显示最后更新日期（show_last_update）</strong>属性值 1 | 0<br />
例子：&lt;?php wp_dropdown_categories(&#8217;show_last_update=1&#8242;); ?&gt;<br />
<strong>是否显示目录内文章数量</strong>（show_count）属性值 1 | 0<br />
例子：&lt;?php wp_dropdown_categories(&#8217;show_count=1&#8242;); ?&gt;<br />
<strong>是否隐藏空目录（hide_empty）属性值 1 | 0<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8216;hide_empty=0&#8242;); ?&gt;<br />
<strong>显示子目录（Child of）</strong>属性值类型为 Interger<br />
根据目录ID显示其子目录<br />
例子：&lt;?php wp_dropdown_categories(&#8216;child_of=5&#8242;); ?&gt;<br />
<strong>排除指定目录（exclude），以逗号分开指定目录的ID。参数值类型：Interger。<br />
</strong>例子：&lt;?php wp_dropdown_categories(&#8216;exclude=5,12&#8242;); ?&gt;<br />
输出（echo）属性值 1 | 0,当参数echo=0是返回PHP形式的代码共使用。<br />
例子：&lt;?php wp_dropdown_categories(&#8216;echo=0&#8242;); ?&gt;<br />
<strong>下拉列表中的选中项（selected）属性值类型：Interger。，参数范围为目录ID。<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8217;selected=5&#8242;); ?&gt;<br />
<strong>层级（heirarchial），属性值 1 | 0<br />
</strong>例子：<br />
&lt;?php wp_dropdown_categories(&#8216;heirarchial=1&#8242;); ?&gt;<br />
<strong>目录下拉列表名称（name），默认值为 “cat”。</strong><br />
例子：<br />
&lt;?php wp_dropdown_categories(&#8216;name=cat-dropdown&#8217;); ?&gt;<br />
<strong>目录下拉列表类（class）,默认值为“postform”。</strong><br />
例子：<br />
&lt;?php wp_dropdown_categories(&#8216;class=cat-dropdown&#8217;); ?&gt;<br />
<strong>层级目录深度（depth）属性值 0 | -1 | 1 | n。<br />
</strong>0：显示所有目录及子目录，默认值。<br />
-1：平级显示所有目录（子目录无缩进）<br />
1：只先是顶级目录<br />
n：指定层级深度<br />
例子：<br />
&lt;?php wp_dropdown_categories(&#8216;depth=n&#8217;); ?&gt;</li>
<li>获取目录链接（Category Link List）函数-&lt;?php wp_list_categories(&#8216;arguments&#8217;); ?&gt;。<br />
具体参考 <a title="Wordpress目录链接列表函数-Category Link List " href="http://www.renniaofei.com/code/wordpress-function-category-link-list/" target="_blank">Wordpress目录链接列表函数-Category Link List</a></li>
<li>返回文章是否属于某个指定目录（If In Category）函数-in_category()。<br />
&lt;?php if ( in_category(&#8216;category_id&#8217;) ): ?&gt;<br />
// 具体代码<br />
&lt;?php endif; ?&gt;</li>
<li>返回父目录列表（Category’s Parents List）函数-get_category_parents)。<br />
&lt;?php echo(get_category_parents(category, display link, separator, nice name)); ?&gt;</li>
<li>以数组的形式返回文章所属目录（Category Array）的函数-get_the_category()。<br />
&lt;?php foreach((get_the_category()) as $category) {<br />
     echo $category-&gt;cat_name . &#8217; &#8217;;<br />
     }<br />
?&gt;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/design/wordpress-function-category-template-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress函数讲解-Author Template Tags</title>
		<link>http://www.renniaofei.com/design/wordpress-function-author-template-tags/</link>
		<comments>http://www.renniaofei.com/design/wordpress-function-author-template-tags/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 16:14:20 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[设计]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=93</guid>
		<description><![CDATA[设计Wordpress主题涉及到很多函数，我们按字母排序进行了整理，并附有注释和讲解，开发者可以参考这些函数，希望可以加快你的开发进度。

作者模块标签函数集 Author Template Tags

获取文章作者的名称（Author）函数-&#60;?php the_author(); ?&#62;，无参数。
获取文章作者的描述（Description）函数-&#60;?php the_author_description();?&#62;,无参数。
获取用户的登陆名（Author Login）函数-&#60;?php the_author_login();?&#62;,无参数。
获取用户的名（Author First Name）函数-&#60;?php the_author_firstname();?&#62;,无参数。
获取用户的姓（Author LastName）函数-&#60;?php the_author_lastname(); ?&#62;，无参数。
获取用户的昵称（Author Nickname）函数-&#60;?php the_author_nickname(); ?&#62;，无参数。
获取作者的ID （Author ID）函数-&#60;?php the_author_ID(); ?&#62;,无参数。
获取作者的Email（Author Email）函数-&#60;?php the_author_email(); ?&#62;，无参数。
获取作者的URL（Author URL）函数&#60;?php the_author_url(); ?&#62;，无参数。
获取作者的网站链接（Author Link）函数&#60;?php the_author_link(); ?&#62;，无参数。
获取用户的Author AIM Screenname函数&#60;?php the_author_aim(); ?&#62;，无参数。
获取用户的Author Yahoo IM ID函数&#60;?php the_author_yim(); ?&#62;，无参数。
获取用户发表的文章数量（Author Posts）函数&#60;?php the_author_posts(); ?&#62;，无参数。
获取用户所有文章的链接（Author Posts Link）函数&#60;?php the_author_posts_link(); ?&#62;，无参数。
获取用户列表（Author List）函数&#60;?php wp_list_authors(&#8216;arguments&#8217;); ?&#62;多参数。
例如：&#60;?php wp_list_authors(&#8216;exclude_admin=1&#38;show_fullname=0&#8242;); ?&#62;
参数说明
optioncount：用户发表的文章数量
&#60;?php wp_list_authors(&#8216;optioncount=1&#8242;); ?&#62;
exclude_admin：将管理员用户排除
&#60;?php wp_list_authors(&#8216;exclude_admin=0&#8242;); [...]]]></description>
			<content:encoded><![CDATA[<p>设计Wordpress主题涉及到很多函数，我们按字母排序进行了整理，并附有注释和讲解，开发者可以参考这些函数，希望可以加快你的开发进度。<br />
<span id="more-93"></span><br />
<strong>作者模块标签函数集 Author Template Tags</strong></p>
<ol>
<li>获取文章作者的名称（Author）函数-&lt;?php the_author(); ?&gt;，无参数。</li>
<li>获取文章作者的描述（Description）函数-&lt;?php the_author_description();?&gt;,无参数。</li>
<li>获取用户的登陆名（Author Login）函数-&lt;?php the_author_login();?&gt;,无参数。</li>
<li>获取用户的名（Author First Name）函数-&lt;?php the_author_firstname();?&gt;,无参数。</li>
<li>获取用户的姓（Author LastName）函数-&lt;?php the_author_lastname(); ?&gt;，无参数。</li>
<li>获取用户的昵称（Author Nickname）函数-&lt;?php the_author_nickname(); ?&gt;，无参数。</li>
<li>获取作者的ID （Author ID）函数-&lt;?php the_author_ID(); ?&gt;,无参数。</li>
<li>获取作者的Email（Author Email）函数-&lt;?php the_author_email(); ?&gt;，无参数。</li>
<li>获取作者的URL（Author URL）函数&lt;?php the_author_url(); ?&gt;，无参数。</li>
<li>获取作者的网站链接（Author Link）函数&lt;?php the_author_link(); ?&gt;，无参数。</li>
<li>获取用户的Author AIM Screenname函数&lt;?php the_author_aim(); ?&gt;，无参数。</li>
<li>获取用户的Author Yahoo IM ID函数&lt;?php the_author_yim(); ?&gt;，无参数。</li>
<li>获取用户发表的文章数量（Author Posts）函数&lt;?php the_author_posts(); ?&gt;，无参数。</li>
<li>获取用户所有文章的链接（Author Posts Link）函数&lt;?php the_author_posts_link(); ?&gt;，无参数。</li>
<li>获取用户列表（Author List）函数&lt;?php wp_list_authors(&#8216;arguments&#8217;); ?&gt;多参数。<br />
例如：&lt;?php wp_list_authors(&#8216;exclude_admin=1&amp;show_fullname=0&#8242;); ?&gt;<br />
参数说明<br />
optioncount：用户发表的文章数量<br />
&lt;?php wp_list_authors(&#8216;optioncount=1&#8242;); ?&gt;<br />
exclude_admin：将管理员用户排除<br />
&lt;?php wp_list_authors(&#8216;exclude_admin=0&#8242;); ?&gt;<br />
show_fullname：显示用户的姓和名<br />
&lt;?php wp_list_authors(&#8217;show_fullname=1&#8242;); ?&gt;<br />
hide_empty：隐藏没有发表文章的用户信息<br />
&lt;?php wp_list_authors(&#8216;hide_empty=0&#8242;); ?&gt;<br />
feed：以文字的形式显示RSS FEED 链接<br />
&lt;?php wp_list_authors(&#8216;feed=RSS&#8217;); ?&gt;<br />
feed_image：以图片的新式显示RSS feed 链接<br />
&lt;?php wp_list_authors(&#8216;feed_image=images/picture.jpg&#8217;);?&gt;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/design/wordpress-function-author-template-tags/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress 主题常用函数</title>
		<link>http://www.renniaofei.com/design/wordpress-theme-codes-for-web-designer/</link>
		<comments>http://www.renniaofei.com/design/wordpress-theme-codes-for-web-designer/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 16:16:54 +0000</pubDate>
		<dc:creator>任鸟飞</dc:creator>
				<category><![CDATA[编码]]></category>
		<category><![CDATA[设计]]></category>
		<category><![CDATA[WordPress 教程]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://www.renniaofei.com/?p=76</guid>
		<description><![CDATA[Wordpress作为最受欢迎的Blog系统，以其易用、便捷、功能，受到越来越多的网页设计者及开发者的喜爱。下面列出了Wordpress主题设计过程中经常使用的一些函数。

列出最新发表的文章

&#60;?php wp_get_archives('type=postbypost&#38;limit=5'); ?&#62;
或者


&#60;?php $recentposts = get_posts('numberposts=12&#38;category=4');
foreach ($recentposts as $post) : setup_postdata($post); ?&#62;
&#60;li&#62;&#60;a href="&#60;?php the_permalink() ?&#62;"&#62;&#60;?php the_title(); ?&#62;&#60;/a&#62;&#60;/li&#62;
&#60;?php endforeach; ?&#62;

显示目录

&#60;h2&#62;目录&#60;/h2&#62;
&#60;ul&#62;

&#60;?php wp_list_cats('sort_column=name'); ?&#62;
&#60;/ul&#62;

显示归档

&#60;h2&#62;归档&#60;/h2&#62;

&#60;ul&#62;

&#60;?php wp_get_archives('type=monthly'); ?&#62;

&#60;/ul&#62;
显示标签云

&#60;?php wp_tag_cloud('smallest=8&#38;largest=36&#38;'); ?&#62;

显示Blogroll

&#60;ul&#62;  &#60;?php wp_list_bookmarks('title_li=&#38;categorize=0'); ?&#62;  &#60;/ul&#62;
显示标签

&#60;?php the_tags(); ?&#62;
显示页面链接

&#60;h2&#62;页面&#60;/h2&#62;

&#60;ul&#62;

&#60;?php wp_list_pages('title_li='); ?&#62;

&#60;/ul&#62;
列出最新评论

&#60;?php

global $wpdb;

$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,

comment_post_ID, comment_author, comment_date_gmt, comment_approved,

comment_type,comment_author_url,

SUBSTRING(comment_content,1,30) AS com_excerpt

FROM $wpdb-&#62;comments

LEFT OUTER JOIN $wpdb-&#62;posts ON ($wpdb-&#62;comments.comment_post_ID =

$wpdb-&#62;posts.ID)

WHERE comment_approved = '1' AND comment_type = '' AND

post_password = ''

ORDER BY comment_date_gmt DESC

LIMIT 10";

$comments = $wpdb-&#62;get_results($sql);

$output = $pre_HTML;

$output .= "\n&#60;ul&#62;";

foreach ($comments as $comment) {

$output .= "\n&#60;li&#62;".strip_tags($comment-&#62;comment_author)

.":" . "&#60;a href=\"" . get_permalink($comment-&#62;ID) .

"#comment-" . $comment-&#62;comment_ID . "\" title=\"on " .

$comment-&#62;post_title . "\"&#62;" . strip_tags($comment-&#62;com_excerpt)

."&#60;/a&#62;&#60;/li&#62;";

}

$output .= "\n&#60;/ul&#62;";

$output .= $post_HTML;

echo $output;?&#62;
显示于管理员相关的链接

&#60;ul&#62;

&#60;?php wp_register(); ?&#62;

&#60;li&#62;&#60;?php wp_loginout(); ?&#62;&#60;/li&#62;

&#60;li&#62;&#60;a href="http://www.wordpress.org/"&#62;WordPress&#60;/a&#62;&#60;/li&#62;

&#60;?php wp_meta(); ?&#62;

&#60;li&#62;&#60;a href="http://validator.w3.org/check?uri=referer"&#62;XHTML&#60;/a&#62;&#60;/li&#62;

&#60;/ul&#62;
列出评论数最多的文章

&#60;?php $result = $wpdb-&#62;get_results("SELECT

comment_count,ID,post_title FROM $wpdb-&#62;posts ORDER BY comment_count

DESC LIMIT 0 , 10");

foreach ($result as $topten) {

$postid = $topten-&#62;ID;

$title = $topten-&#62;post_title;

$commentcount = $topten-&#62;comment_count;

if ($commentcount != 0) { ?&#62;

&#60;li&#62;&#60;a href="&#60;?php echo get_permalink($postid); ?&#62;"

title="&#60;?php echo $title ?&#62;"&#62;&#60;?php echo $title

?&#62;&#60;/a&#62;&#60;/li&#62;

&#60;?php } } ?&#62;
根据目录编号ID显示文章列表

function get_post_by_category($cat,$num)
{
global $wpdb;
$sql = "SELECT id,post_title
FROM $wpdb-&#62;posts
LEFT OUTER JOIN $wpdb-&#62;term_relationships ON $wpdb-&#62;term_relationships.object_id = $wpdb-&#62;posts.ID
WHERE $wpdb-&#62;term_relationships.term_taxonomy_id =$cat
LIMIT 0 , $num";

$posts = $wpdb-&#62;get_results($sql);
$output = $pre_HTML;
foreach ($posts as $post) {
$output .= "\n&#60;a href=\"" . get_permalink($post-&#62;ID) . "\"&#62;".$post-&#62;post_title."&#60;/a&#62;";
}
$output .= $post_HTML;
echo $output;

}
]]></description>
			<content:encoded><![CDATA[<p>Wordpress作为最受欢迎的Blog系统，以其易用、便捷、功能，受到越来越多的网页设计者及开发者的喜爱。下面列出了Wordpress主题设计过程中经常使用的一些函数。<br />
<span id="more-76"></span></p>
<h4>列出最新发表的文章</h4>
<pre><code>
&lt;?php wp_get_archives('type=postbypost&amp;limit=5'); ?&gt;</code></pre>
<p>或者</p>
<pre><code>

&lt;?php $recentposts = get_posts('numberposts=12&amp;category=4');
foreach ($recentposts as $post) : setup_postdata($post); ?&gt;
&lt;li&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;
</code></pre>
<h4>显示目录</h4>
<pre><code>
&lt;h2&gt;目录&lt;/h2&gt;
&lt;ul&gt;

&lt;?php wp_list_cats('sort_column=name'); ?&gt;
&lt;/ul&gt;
</code></pre>
<h4>显示归档</h4>
<pre><code>
&lt;h2&gt;归档&lt;/h2&gt;

&lt;ul&gt;

&lt;?php wp_get_archives('type=monthly'); ?&gt;

&lt;/ul&gt;</code></pre>
<h4>显示标签云</h4>
<pre><code>
&lt;?php wp_tag_cloud('smallest=8&amp;largest=36&amp;'); ?&gt;
</code>
<h4>显示Blogroll</h4>

&lt;ul&gt;  &lt;?php wp_list_bookmarks('title_li=&amp;categorize=0'); ?&gt;  &lt;/ul&gt;</pre>
<h4>显示标签</h4>
<pre><code>
&lt;?php the_tags(); ?&gt;</code></pre>
<h4>显示页面链接</h4>
<pre><code>
&lt;h2&gt;页面&lt;/h2&gt;

&lt;ul&gt;

&lt;?php wp_list_pages('title_li='); ?&gt;

&lt;/ul&gt;</code></pre>
<h4>列出最新评论</h4>
<pre><code>
&lt;?php

global $wpdb;

$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,

comment_post_ID, comment_author, comment_date_gmt, comment_approved,

comment_type,comment_author_url,

SUBSTRING(comment_content,1,30) AS com_excerpt

FROM $wpdb-&gt;comments

LEFT OUTER JOIN $wpdb-&gt;posts ON ($wpdb-&gt;comments.comment_post_ID =

$wpdb-&gt;posts.ID)

WHERE comment_approved = '1' AND comment_type = '' AND

post_password = ''

ORDER BY comment_date_gmt DESC

LIMIT 10";

$comments = $wpdb-&gt;get_results($sql);

$output = $pre_HTML;

$output .= "\n&lt;ul&gt;";

foreach ($comments as $comment) {

$output .= "\n&lt;li&gt;".strip_tags($comment-&gt;comment_author)

.":" . "&lt;a href=\"" . get_permalink($comment-&gt;ID) .

"#comment-" . $comment-&gt;comment_ID . "\" title=\"on " .

$comment-&gt;post_title . "\"&gt;" . strip_tags($comment-&gt;com_excerpt)

."&lt;/a&gt;&lt;/li&gt;";

}

$output .= "\n&lt;/ul&gt;";

$output .= $post_HTML;

echo $output;?&gt;</code></pre>
<h4>显示于管理员相关的链接</h4>
<pre><code>
&lt;ul&gt;

&lt;?php wp_register(); ?&gt;

&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.wordpress.org/"&gt;WordPress&lt;/a&gt;&lt;/li&gt;

&lt;?php wp_meta(); ?&gt;

&lt;li&gt;&lt;a href="http://validator.w3.org/check?uri=referer"&gt;XHTML&lt;/a&gt;&lt;/li&gt;

&lt;/ul&gt;</code></pre>
<h4>列出评论数最多的文章</h4>
<pre><code>
&lt;?php $result = $wpdb-&gt;get_results("SELECT

comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count

DESC LIMIT 0 , 10");

foreach ($result as $topten) {

$postid = $topten-&gt;ID;

$title = $topten-&gt;post_title;

$commentcount = $topten-&gt;comment_count;

if ($commentcount != 0) { ?&gt;

&lt;li&gt;&lt;a href="&lt;?php echo get_permalink($postid); ?&gt;"

title="&lt;?php echo $title ?&gt;"&gt;&lt;?php echo $title

?&gt;&lt;/a&gt;&lt;/li&gt;

&lt;?php } } ?&gt;</code></pre>
<h4>根据目录编号ID显示文章列表</h4>
<pre><code>
function get_post_by_category($cat,$num)
{
global $wpdb;
$sql = "SELECT id,post_title
FROM $wpdb-&gt;posts
LEFT OUTER JOIN $wpdb-&gt;term_relationships ON $wpdb-&gt;term_relationships.object_id = $wpdb-&gt;posts.ID
WHERE $wpdb-&gt;term_relationships.term_taxonomy_id =$cat
LIMIT 0 , $num";

$posts = $wpdb-&gt;get_results($sql);
$output = $pre_HTML;
foreach ($posts as $post) {
$output .= "\n&lt;a href=\"" . get_permalink($post-&gt;ID) . "\"&gt;".$post-&gt;post_title."&lt;/a&gt;";
}
$output .= $post_HTML;
echo $output;

}</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.renniaofei.com/design/wordpress-theme-codes-for-web-designer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.575 seconds -->
