<?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; wordpress模板</title>
	<atom:link href="http://www.blook.org.cn/tag/wordpress%e6%a8%a1%e6%9d%bf/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blook.org.cn</link>
	<description>网罗网络精华</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:44:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress模板制作教程+常用函数</title>
		<link>http://www.blook.org.cn/wordpress-tutorial-templates-to-create-commonly-used-functions/</link>
		<comments>http://www.blook.org.cn/wordpress-tutorial-templates-to-create-commonly-used-functions/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 02:56:23 +0000</pubDate>
		<dc:creator>菠萝</dc:creator>
				<category><![CDATA[资源分享]]></category>
		<category><![CDATA[wordpress模板]]></category>

		<guid isPermaLink="false">http://www.blook.org.cn/?p=723</guid>
		<description><![CDATA[已经把Dedecms的模板制作掌握得差不多了，今天开始转入WordPress的模板制作工作中来，其实模板制作方法都是一样的，对我来说，只是需要了解不同CMS或BLOG程序的代码结构和调用方式，掌握了这些，模板制作起来就容易多了，下面的内容分为Wordpress模板教程和WordPress模板函数两部分： WordPress模板教程 （转自蔚蓝光辉） 每一套 WP 主题都由结构层、表现层和数据层构成，可以说是典型的、符合 Web 体系标准的“三层结构”。WP主题的这种模式块化的特点决定了其设计其实是非常简单，但又极其灵活的。可以说，学会了制作 WP 主题，就相当于基本理解了 Web开发的客户端模型，对进一步学习掌握 Web 技术具有重要意义。这也正是 WP 的魅力所在！ 在一套 WP 主题中，最基本的两个文件是 index.php 和style.css。其中，前者定义结构和内容，后者定义样式。所谓结构，就是由指由 XHTML 标签构成的网页基本架构。在 WP主题中，结构层主要使用的是添加了适当的 id 或（和）class 属性的 div 和 ul元素，以便更好地通过表现层来控制页面的布局和外观。所谓表现层，其实就是网页的布局和样式－－也就是外观。表现层由CSS（级联样式表）规则定义构成。而数据层，顾名思义，也就是网站中实际显示的内容，是通过调用 WP内置的函数（有时需要传递适当的参数）从数据库中取得的。 说明：为简明起见，本教程不涉及如何定义样式表（CSS）文件的内容。 事实上，当我们打开某个主题的文件夹时，看到的并不止这两个文件，而是更多。但一般来说，在一个完整的 WP 主题文件夹中都应该包含下列文件（也称为模板文件）： 页面 模板文件 用途 首页 index.php 显示网站首页 单页 single.php 显示博文的页面（相当于细节页） 静态页 page.php 显示静态页的页面（包含各级静态页面） 分类页 category.php 显示分类页的页面（相当于栏目页） 存档页 archive.php 显示存档页的页面（相当于按时间归类的栏目页） 搜索页 search.php 显示搜索结果的页面 [...]]]></description>
			<content:encoded><![CDATA[<p>已经把Dedecms的模板制作掌握得差不多了，今天开始转入WordPress的模板制作工作中来，其实模板制作方法都是一样的，对我来说，只是需要了解不同CMS或BLOG程序的代码结构和调用方式，掌握了这些，模板制作起来就容易多了，下面的内容分为Wordpress模板教程和WordPress模板函数两部分：</p>
<h2 style="text-align: center;">WordPress模板教程</h2>
<p style="text-align: center;">（转自<a href="http://hi.baidu.com/gofight/blog/item/98ac0cc367a61d3ce4dd3baf.html" target="_blank">蔚蓝光辉</a>）</p>
<p>每一套 WP 主题都由结构层、表现层和数据层构成，可以说是典型的、符合 Web 体系标准的“三层结构”。WP主题的这种模式块化的特点决定了其设计其实是非常简单，但又极其灵活的。可以说，学会了制作 WP 主题，就相当于基本理解了 Web开发的客户端模型，对进一步学习掌握 Web 技术具有重要意义。这也正是 WP 的魅力所在！<br />
在一套 WP 主题中，最基本的两个文件是 index.php 和style.css。其中，前者定义结构和内容，后者定义样式。所谓结构，就是由指由 XHTML 标签构成的网页基本架构。在 WP主题中，结构层主要使用的是添加了适当的 id 或（和）class 属性的 div 和 ul元素，以便更好地通过表现层来控制页面的布局和外观。所谓表现层，其实就是网页的布局和样式－－也就是外观。表现层由CSS（级联样式表）规则定义构成。而数据层，顾名思义，也就是网站中实际显示的内容，是通过调用 WP内置的函数（有时需要传递适当的参数）从数据库中取得的。</p>
<p>说明：为简明起见，本教程不涉及如何定义样式表（CSS）文件的内容。</p>
<p>事实上，当我们打开某个主题的文件夹时，看到的并不止这两个文件，而是更多。但一般来说，在一个完整的 WP 主题文件夹中都应该包含下列文件（也称为模板文件）：</p>
<blockquote><p>页面 模板文件 用途<br />
首页 index.php 显示网站首页<br />
单页 single.php 显示博文的页面（相当于细节页）<br />
静态页 page.php 显示静态页的页面（包含各级静态页面）<br />
分类页 category.php 显示分类页的页面（相当于栏目页）<br />
存档页 archive.php 显示存档页的页面（相当于按时间归类的栏目页）<br />
搜索页 search.php 显示搜索结果的页面<br />
评论页 comments.php 显示评论的页面<br />
弹出式评论页 comments-popup.php 显示弹出式评论的页面<br />
404错误页 404.php 显示 404 错误信息的页面<br />
级联样式表 style.css 控制页面布局外观</p></blockquote>
<p>除此之外，一套主题模板中还可以包含 author.php、home.php、date.php、searchform.php 以及 functions.php 等页面（其中部分页面稍后介绍）。<br />
虽然上面列出了与 WP 内置功能对应的 9 个 php 文件，但制作一套主题远没有想像得那么复杂。因为事实上，你只需要制作一个 index.php 文件，就可以派生出另外 8 个文件来！<br />
从 WP 应用主题的机制来说，这 9 个模板文件是存在优先级差别的，也可以认为是重要性不同。它们的优先级顺序是：<br />
index.php -&gt; single.php -&gt; page.php -&gt; archive.php -&gt; search.php -&gt; 404.php。<br />
这样，当不存在后边的页面时，WP 会自动调用前面的页面，直至调用 index.php。比如，当程序调用页面页 page.php 时，如果page.php 模板文件不存在，那么程序会尝试调用前面的文件－－single.php。而如果 single.php也不存在，那么就会调用最终的 index.php 来显示页面页。可见 index.php属于“垫底儿”的缺省页面，它的重要性是最高的。但当存在具体页面时，还是要优先使用具体的页面，可见具体的页面优先级最高。<br />
在明确了 index.php 是一套 WP 主题的核心之后，我们就可以将制作 WP 主题的过程简单地分成两步，即－－定义主模板文件 index.php 和派生其他模板文件。<br />
定义主模板文件 index.php从页面布局的角度上，有必要将主模板文件 index.php 拆分成 header.php、sidebar.php 和footer.php 三个子页面。WP 专门为在 index.php 中包含这三个子页面提供了对应的get_header()、get_sidebar() 和 get_footer() 函数。<br />
下面，就来详细介绍一下制作 index.php 页面的过程：<br />
首先，在 myThemes 文件夹中建立一个文本文件并将其重命名为 index.php，然后再建立一个 style.css 文件（内容暂时留空）。<br />
然后，用你喜欢的文本编辑器打开 index.php 并输入下列代码（最好复制，因为这一部分不重要）：</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“&gt;<br />
&lt;html xmlns=”http://www.w3.org/1999/xhtml“&gt;<br />
&lt;head profile=”http://gmpg.org/xfn/11“&gt;<br />
&lt;meta http-equiv=”Content-Type” content=”&lt;?php bloginfo(’html_type’); ?&gt;;<br />
charset=&lt;?php bloginfo(’charset’); ?&gt;” /&gt;<br />
&lt;title&gt;&lt;?php bloginfo(’name’); ?&gt; &lt;?php if ( is_single() ) { ?&gt; » Blog Archive &lt;?php } ?&gt;<br />
&lt;?php wp_title(); ?&gt;&lt;/title&gt;<br />
&lt;meta name=”generator” content=”WordPress &lt;?php bloginfo(’version’); ?&gt;” /&gt;<br />
&lt;!– leave this for stats –&gt;<br />
&lt;link rel=”stylesheet” href=”&lt;?php bloginfo(’stylesheet_url’); ?&gt;”<br />
type=”text/css” media=”all” /&gt;<br />
&lt;link rel=”stylesheet” href=”&lt;?php bloginfo(’stylesheet_directory’); ?&gt;<br />
/print.css” type=”text/css” media=”print” /&gt;<br />
&lt;link rel=”alternate” type=”application/rss+xml” title=”&lt;?php bloginfo(’name’); ?&gt;<br />
RSS Feed” href=”&lt;?php bloginfo(’rss2_url’); ?&gt;”/&gt;<br />
&lt;link rel=”pingback” href=”&lt;?php bloginfo(’pingback_url’); ?&gt;” /&gt;<br />
&lt;?php wp_head(); ?&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>显然，这是一些构成网页文件的 HTML 代码，当然其中包含 PHP 代码。如前所述，HTML 代码定义结构，而 PHP 代码用于生成内容。<br />
在 WP 后台的“主题”模块中，选择 myTheme 主题。然后，在浏览器中观察你的 WP 外观。此时，应该显示页面一片空白。但通过“查看源文件”，你会发现 index.php 中的 PHP 代码已经生成了一些头部内容。<br />
接着，我们开始动手定义 index.php 中 body 部分的结构和内容。<br />
（一）构建 header在 body 元素内，新建如下结构化标记元素，注意各元素都带有不同的 id 属性：</p>
<blockquote><p>&lt;div id=”page”&gt;<br />
&lt;div id=”header”&gt;&lt;/div&gt;<br />
&lt;div id=”content”&gt;&lt;/div&gt;<br />
&lt;div id=”sidebar”&gt;&lt;/div&gt;<br />
&lt;div id=”footer”&gt;&lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>然后，在该 &lt;div id=”header”&gt;&lt;/div&gt; 元素的两个标签之间输入下列代码：</p>
<blockquote><p>
&lt;h1&gt;&lt;a href=”&lt;?php bloginfo(’url’); ?&gt;”title=”&lt;?php bloginfo(’name’); ?&gt;”&gt;&lt;?php bloginfo(’name’);?&gt;&lt;/a&gt;&lt;/h1&gt;<br />
&lt;p&gt;&lt;?php bloginfo(’description’); ?&gt;&lt;/p&gt;</p></blockquote>
<p>这里用到了 WP 内置的 bloginfo 函数来生成内容，其中：</p>
<blockquote><p>bloginfo(’url’)返回网站主页链接；<br />
bloginfo(’name’)返回网站标题；<br />
bloginfo(’description’)返回网站描述。</p></blockquote>
<p>保存 index.php 文件，然后在浏览器中按 F5 刷新一下页面，看能看到什么？再通过“查看源文件”，核对一下由 WP 的 bloginfo() 函数生成的相关信息。<br />
（二）构建 content在 &lt;div id=”content”&gt;&lt;/div&gt; 中，我们要通过循环显示博文，包括每个博文的标题、作者、发表日期以及其他相关信息。并且，可以分页显示博文（取决于 WP 后台的设置）。<br />
首先，在 &lt;div id=”content”&gt; 与 &lt;/div&gt; 之间输入下列代码：</p>
<blockquote><p>
&lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div class=”post” id=”post-&lt;?php the_ID() ?&gt;”&gt;<br />
&lt;!– 博文标题及链接 –&gt;<br />
&lt;h2&gt;&lt;a href=”&lt;?php the_permalink() ?&gt;” rel=”bookmark” title=”&lt;?php the_title(); ?&gt;”&gt;<br />
&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;!– 发表日期 –&gt;<br />
&lt;div class=”post-date”&gt;<br />
&lt;span class=”post-month”&gt;&lt;?php the_time(’M’) ?&gt;&lt;/span&gt;<br />
&lt;span class=”post-day”&gt;&lt;?php the_time(’d’) ?&gt;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;!– 作者 –&gt;<br />
&lt;span class=”post-author”&gt;&lt;?php _e(’Author’); ?&gt;：&lt;?php the_author(’, ‘) ?&gt;&lt;/span&gt;<br />
&lt;!– 类别 –&gt;<br />
&lt;span class=”post-cat”&gt;&lt;?php _e(’Categories’); ?&gt;：&lt;?php the_category(’, ‘) ?&gt;&lt;/span&gt;<br />
&lt;!– 注释 –&gt;<br />
&lt;span class=”post-comments”&gt;<br />
&lt;?php comments_popup_link(’No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?&gt;&lt;/span&gt;<br />
&lt;!– 内容 –&gt;<br />
&lt;div class=”entry”&gt;<br />
&lt;?php the_content(’更多内容 »’); ?&gt;<br />
&lt;/div&gt;<br />
&lt;!– 其他元（Meta）数据 –&gt;<br />
&lt;div class=”post-meta”&gt;<br />
&lt;?php edit_post_link(’编辑’,’ | ‘,”); ?&gt;<br />
&lt;/div&gt; &lt;/div&gt;<br />
&lt;?php endwhile; ?&gt;&lt;div class=”navigation”&gt;<br />
&lt;span class=”previous-entries”&gt;&lt;?php next_posts_link(’前一篇’)?&gt;&lt;/span&gt; &lt;span class=”next-entries”&gt;&lt;?phpprevious_posts_link(’后一篇’) ?&gt;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;div class=”post”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Not Found’); ?&gt;&lt;/h2&gt;<br />
&lt;/div&gt;&lt;?php endif; ?&gt;</p></blockquote>
<p>看似复杂，其实不然。首先：</p>
<blockquote><p>
&lt;?php if (have_posts()) : ?&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;?php endif; ?&gt;</p></blockquote>
<p>这三行，在 WP 中表示 if 控制结果。注意，if 语句通过测试 have_posts() 函数来测试是否存在博文。而</p>
<blockquote><p>
&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
&lt;?php endwhile; ?&gt;</p></blockquote>
<p>这两行，是 WP 中的 while 循环。其中，while 语句通过测试 have_posts() 决定是否调用 the_post()函数。如果测试 have_posts() 返回 true，则调用 the_post() 函数，初始化与博文相关的内置变量。<br />
在 while 循环内部，首先要注意通过 div、h2、span 这三个元素定义的嵌套语义结构，以及相应元素的 class 和 id属性（其中只为 class 为 post 的 div 元素定义了一个 id 属性－－post-&lt;?php the_ID()?&gt;）。这是将来使用 CSS 控制外观的关键所在。在这个 div 元素中，为显示博文的相关信息，分别调用了以下 WP 函数：</p>
<blockquote><p>the_ID()：返回博文 ID；<br />
the_permalink()：返回博文固定链接 URL；<br />
the_title()：返回博文标题；<br />
the_time(’M’)：返回发表日期中的月份；<br />
the_time(’d’)：返回发表日期中的天；<br />
the_author()：返回博文作者；<br />
the_category()：返回博文的类别；<br />
the_content()：返回博文的内容，其中的参数表示用于“更多内容”的链接文本；</p></blockquote>
<p>以上函数都是以 the_ 开头的，加上后面的函数名不仅颇有自解释的味道，而且令人联想到 this 关键字。此外<br />
_e() 函数是一个包装函数，这个函数主要用于语言的转换，如果调用该函数并传递标准的 WP 术语，如：Author 或 Categories，则返回你相应语言包中的译文，在中文包中分别是“作者”和“类别”。当然，不用也可。但会失去一些适应性。<br />
还有，omments_popup_link() 和 edit_post_link() 两个函数，分别显示注释和编辑链接，这里不多说了。<br />
另外，在 &lt;?php endwhile; ?&gt; 后面显示了分页导航链接，调用的函数分别是：next_posts_link() 和previous_posts_link()。此时，如果你的博文总数小于 WP 后台设置的最多显示数目，比如：你在后台设置最多显示 5篇，而你有 10 篇博文，就会分页显示；否则，如果你的博文少于或等于 5 篇则看不到分页导航链接。<br />
最后，不要丢下 &lt;?php else : ?&gt; 语句后面的内容：</p>
<blockquote><p>
&lt;div class=”post”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Not Found’); ?&gt;&lt;/h2&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>显然，这是一个错误提示信息。<br />
（三）构建 sidebarsidebar 的内容当然要在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 元素中构建了。sidebar，中文叫侧边栏，其中可以包含很多内容。比如：分类、页面、链接、日历等等导航及相关信息。<br />
在 WP 中，sidebar 中的内容都以无序（ul）或有序（ol）列表的形式输出。因此，需要在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 中输入以下标记：</p>
<blockquote><p>
&lt;ul&gt;<br />
&lt;?php if ( !function_exists(’dynamic_sidebar’) || !dynamic_sidebar() ) : ?&gt;<br />
&lt;li id=”search”&gt;<br />
&lt;?php include(TEMPLATEPATH .’/searchform.php’); ?&gt;<br />
&lt;/li&gt; &lt;li id=”calendar”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Calendar’); ?&gt;&lt;/h2&gt;<br />
&lt;?php get_calendar(); ?&gt;<br />
&lt;/li&gt; &lt;?php wp_list_pages(’title_li=&lt;h2&gt;页面&lt;/h2&gt;’); ?&gt; &lt;li class=”catnav”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Categories’); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_list_cats(’sort_column=name&amp;optioncount=1&amp;hierarchical=0′); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;li class=”archivesnav”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Archives’); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php wp_get_archives(’type=monthly’); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;li class=”blogrollnav”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Links’); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;<br />
&lt;?php get_links(’-1′, ‘&lt;li&gt;’, ‘&lt;/li&gt;’, ‘&lt;br /&gt;’, FALSE, ‘id’, FALSE, FALSE, -1, FALSE); ?&gt;<br />
&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;li class=”meta”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Meta’); ?&gt;&lt;/h2&gt;<br />
&lt;ul&gt;&lt;?php wp_register(); ?&gt;&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;<br />
&lt;?php wp_meta(); ?&gt;&lt;/ul&gt;<br />
&lt;/li&gt;<br />
&lt;?php endif ?&gt;<br />
&lt;/ul&gt;</p></blockquote>
<p>以上代码从第三行开始，分别通过包含 searchform.php 显示搜索表单；</p>
<blockquote><p>调用 get_calendar() 函数显示日历；<br />
调用 wp_list_pages() 函数显示页面导航；<br />
调用 wp_list_cats() 函数显示分类导航；<br />
调用 wp_get_archives() 函数显示存档导航；<br />
调用 get_links() 函数显示链接导航。</p></blockquote>
<p>在构建侧边栏时，要为生成搜索框新建一个 searchform.php 文件，其内容如下：</p>
<blockquote><p>
&lt;form method=”get” id=”searchform” action=”&lt;?php bloginfo(’home’); ?&gt;/”&gt;<br />
&lt;div&gt;<br />
&lt;input type=”text” value=”&lt;?php echo wp_specialchars($s, 1); ?&gt;” name=”s” id=”s” size=”15″ /&gt;&lt;br /&gt;<br />
&lt;input type=”submit” id=”searchsubmit” value=”Search” /&gt;<br />
&lt;/div&gt;<br />
&lt;/form&gt;</p></blockquote>
<p>将其保存在 myTheme 文件夹中，通过 include 语句包含进来就可以了。注意，常量 TEMPLATEPATH 中保存的是模板路径。<br />
最后，说明一下以上代码第二行和倒数第二行。显然这是一个 if 语句块。那这个 if 语句块包含 sidebar是何用意呢？这是部件化侧边栏的需要，就是让 sidebar 适合 Widget 插件（WP 2.0 后内置了Widget，所以不用再安装了）。如果要使用 Widget 插件，必须对 sidebar 进行部件化。这样，在 WP 后台通过 Widget插件你就可以使用拖动来方便地定义侧边栏的组件了。部件化侧边栏，除了在 ul 元素内侧放入这个 if 语句之外，还必须在 myTheme文件夹中建立一个文件 functions.php，其内容如下：</p>
<blockquote><p>
&lt;?php<br />
if ( function_exists(’register_sidebar’) )<br />
register_sidebar(array(<br />
‘before_widget’ =&gt; ‘&lt;li id=”%1$s” class=”widget %2$s”&gt;’,<br />
‘after_widget’ =&gt; ‘&lt;/li&gt;’,<br />
‘before_title’ =&gt; ‘&lt;h2 class=”sidebartitle”&gt;’,<br />
‘after_title’ =&gt; ‘&lt;/h2&gt;’,<br />
));<br />
?&gt;</p></blockquote>
<p>（四）构建 footerfooter 中一般都一些版权信息和不太重要的链接。所以可以在 &lt;div id=”footer”&gt;&lt;/div&gt; 元素中简单地放入下列代码：</p>
<blockquote><p>
&lt;p&gt;Copyright © 2007 &lt;?php bloginfo(’name’); ?&gt;&lt;/p&gt;</p></blockquote>
<p>至此，核心 index.php 文件就算是大功告成了！<br />
接下来，是拆分 index.php 和基于 index.php 派生子模板文件。<br />
在 myTheme 文件夹中新建 header.php、sidebar.php 和 footer.php 三个文件。把index.php 中的 &lt;div id=”header”&gt;&lt;/div&gt;、&lt;divid=”sidebar”&gt;&lt;/div&gt; 和 &lt;div id=”footer”&gt;&lt;/div&gt;三个结构化元素及其内容分别转移（剪切）到这三个新文件中。然后，在 &lt;div id=”header”&gt;&lt;/div&gt;原来的位置处输入代码：</p>
<blockquote><p>
&lt;?php get_header();?&gt;</p></blockquote>
<p>在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 原来的位置处输入代码：</p>
<blockquote><p>
&lt;?php get_sidebar();?&gt;</p></blockquote>
<p>在 &lt;div id=”footer”&gt;&lt;/div&gt; 原来的位置处输入代码：</p>
<blockquote><p>
&lt;?php get_footer();?&gt;</p></blockquote>
<p>前面说过，这三个 get 函数是 WP 专门为包含结构化的文件定义的。现在你的 index.php 文件应该如下所示：</p>
<blockquote><p>
&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“&gt;<br />
&lt;html xmlns=”http://www.w3.org/1999/xhtml“&gt;&lt;head profile=”http://gmpg.org/xfn/11“&gt;<br />
&lt;meta http-equiv=”Content-Type” content=”&lt;?phpbloginfo(’html_type’); ?&gt;; charset=&lt;?php bloginfo(’charset’);?&gt;” /&gt;&lt;title&gt;&lt;?php bloginfo(’name’); ?&gt; &lt;?php if (is_single() ) { ?&gt; » Blog Archive &lt;?php } ?&gt; &lt;?phpwp_title(); ?&gt;&lt;/title&gt;&lt;meta name=”generator”content=”WordPress &lt;?php bloginfo(’version’); ?&gt;” /&gt; &lt;!–leave this for stats –&gt;&lt;link rel=”stylesheet” href=”&lt;?phpbloginfo(’stylesheet_url’); ?&gt;” type=”text/css” media=”all” /&gt;<br />
&lt;link rel=”stylesheet” href=”&lt;?php bloginfo(’stylesheet_directory’); ?&gt;/print.css” type=”text/css” media=”print” /&gt;<br />
&lt;link rel=”alternate” type=”application/rss+xml” title=”&lt;?phpbloginfo(’name’); ?&gt; RSS Feed” href=”&lt;?php bloginfo(’rss2_url’);?&gt;” /&gt;<br />
&lt;link rel=”pingback” href=”&lt;?php bloginfo(’pingback_url’); ?&gt;” /&gt;&lt;?php wp_head(); ?&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=”page”&gt;&lt;?php get_header(); ?&gt; &lt;!– content –&gt;<br />
&lt;div id=”content”&gt;<br />
&lt;?php if (have_posts()) : ?&gt;<br />
&lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div class=”post” id=”post-&lt;?php the_ID() ?&gt;”&gt;<br />
&lt;!– 博文标题及链接 –&gt;<br />
&lt;h2&gt;&lt;a href=”&lt;?php the_permalink() ?&gt;” rel=”bookmark” title=”&lt;?php the_title(); ?&gt;”&gt;<br />
&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;!– 发表日期 –&gt;<br />
&lt;div class=”post-date”&gt;<br />
&lt;span class=”post-month”&gt;&lt;?php the_time(’M’) ?&gt;&lt;/span&gt;<br />
&lt;span class=”post-day”&gt;&lt;?php the_time(’d’) ?&gt;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;!– 作者 –&gt;<br />
&lt;span class=”post-author”&gt;&lt;?php _e(’Author’); ?&gt;：&lt;?php the_author(’, ‘) ?&gt;&lt;/span&gt;<br />
&lt;!– 类别 –&gt;<br />
&lt;span class=”post-cat”&gt;&lt;?php _e(’Categories’); ?&gt;：&lt;?php the_category(’, ‘) ?&gt;&lt;/span&gt;<br />
&lt;!– 注释 –&gt;<br />
&lt;span class=”post-comments”&gt;<br />
&lt;?php comments_popup_link(’No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?&gt;&lt;/span&gt;<br />
&lt;!– 内容 –&gt;<br />
&lt;div class=”entry”&gt;<br />
&lt;?php the_content(’更多内容 »’); ?&gt;<br />
&lt;/div&gt;<br />
&lt;!– 其他元（Meta）数据 –&gt;<br />
&lt;div class=”post-meta”&gt;<br />
&lt;?php edit_post_link(’编辑’,’ | ‘,”); ?&gt;<br />
&lt;/div&gt; &lt;/div&gt;<br />
&lt;?php endwhile; ?&gt; &lt;div class=”navigation”&gt;<br />
&lt;span class=”previous-entries”&gt;&lt;?php next_posts_link(’前一篇’)?&gt;&lt;/span&gt; &lt;span class=”next-entries”&gt;&lt;?phpprevious_posts_link(’后一篇’) ?&gt;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;div class=”post”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Not Found’); ?&gt;&lt;/h2&gt;<br />
&lt;/div&gt;&lt;?php endif; ?&gt;<br />
&lt;/div&gt;&lt;!– end content –&gt;&lt;?php get_sidebar(); ?&gt; &lt;?php get_footer(); ?&gt;&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>然后，是派生子模板文件。把这个“模块化”的 index.php 文件另存为single.php、page.php、archive.php、 search.php 和 category.php。当然，都保存在myTheme 文件夹中。这样，WP 在显示页面时就会调用相应的页面文件了。比如，显示博文详细内容时，会调用single.php；而显示页面内容时，则调用 page.php。</p>
<h2 style="text-align: center;">WordPress模板常用函数</h2>
<p style="text-align: center;">（转自<a href="http://zmingcx.cn/wordpress-template-commonly-used-functions.html" target="_blank">知更鸟</a>）</p>
<p>一套完整的WordPress模板应至少具有如下文件：</p>
<blockquote><p>style.CSS : CSS(样式表)文件<br />
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></blockquote>
<p>当然，具体到特定的某款模板，可能不止这些文件，但一般而言，这些文件是每套模板所必备的。</p>
<p>基本条件判断Tag</p>
<blockquote><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></blockquote>
<p>Header部分常用到的PHP函数</p>
<blockquote><p>
&lt;?php bloginfo(’name’); ?&gt; : 博客名称(Title)<br />
&lt;?php bloginfo(’stylesheet_url’); ?&gt; : CSS文件路径<br />
&lt;?php bloginfo(’pingback_url’); ?&gt; : PingBack Url<br />
&lt;?php bloginfo(’template_url’); ?&gt; : 模板文件路径<br />
&lt;?php bloginfo(’version’); ?&gt; : WordPress版本<br />
&lt;?php bloginfo(’atom_url’); ?&gt; : Atom Url<br />
&lt;?php bloginfo(’rss2_url’); ?&gt; : RSS 2.o Url<br />
&lt;?php bloginfo(’url’); ?&gt; : 博客 Url<br />
&lt;?php bloginfo(’html_type’); ?&gt; : 博客网页Html类型<br />
&lt;?php bloginfo(’charset’); ?&gt; : 博客网页编码<br />
&lt;?php bloginfo(’description’); ?&gt; : 博客描述<br />
&lt;?php wp_title(); ?&gt; : 特定内容页(Post/Page)的标题</p></blockquote>
<p>模板常用的PHP函数及命令</p>
<blockquote><p>
&lt;?php get_header(); ?&gt; : 调用Header模板<br />
&lt;?php get_sidebar(); ?&gt; : 调用Sidebar模板<br />
&lt;?php get_footer(); ?&gt; : 调用Footer模板<br />
&lt;?php the_content(); ?&gt; : 显示内容(Post/Page)<br />
&lt;?php if(have_posts()) : ?&gt; : 检查是否存在Post/Page<br />
&lt;?php while(have_posts()) : the_post(); ?&gt; : 如果存在Post/Page则予以显示<br />
&lt;?php endwhile; ?&gt; : While 结束<br />
&lt;?php endif; ?&gt; : If 结束<br />
&lt;?php the_time(’字符串’) ?&gt; : 显示时间，时间格式由“字符串”参数决定，具体参考PHP手册<br />
&lt;?php comments_popup_link(); ?&gt; : 正文中的留言链接。如果使用 comments_popup_script() ，则留言会在新窗口中打开，反之，则在当前窗口打开<br />
&lt;?php the_title(); ?&gt; : 内容页(Post/Page)标题<br />
&lt;?php the_permalink() ?&gt; : 内容页(Post/Page) Url<br />
&lt;?php the_category(’, ‘) ?&gt; : 特定内容页(Post/Page)所属Category<br />
&lt;?php the_author(); ?&gt; : 作者<br />
&lt;?php the_ID(); ?&gt; : 特定内容页(Post/Page) ID<br />
&lt;?php edit_post_link(); ?&gt; : 如果用户已登录并具有权限，显示编辑链接<br />
&lt;?php get_links_list(); ?&gt; : 显示Blogroll中的链接<br />
&lt;?php comments_template(); ?&gt; : 调用留言/回复模板<br />
&lt;?php wp_list_pages(); ?&gt; : 显示Page列表<br />
&lt;?php wp_list_categories(); ?&gt; : 显示Categories列表<br />
&lt;?php next_post_link(’ %link ‘); ?&gt; : 下一篇文章链接<br />
&lt;?php previous_post_link(’%link’); ?&gt; : 上一篇文章链接<br />
&lt;?php get_calendar(); ?&gt; : 日历<br />
&lt;?php wp_get_archives() ?&gt; : 显示内容存档<br />
&lt;?php posts_nav_link(); ?&gt; : 导航，显示上一篇/下一篇文章链接<br />
&lt;?php include(TEMPLATEPATH . ‘/文件名’); ?&gt; : 嵌入其他文件，可为定制的模板或其他类型文件</p></blockquote>
<p>与模板相关的其他函数</p>
<blockquote><p>
&lt;?php _e(’Message’); ?&gt; : 输出相应信息<br />
&lt;?php wp_register(); ?&gt; : 显示注册链接<br />
&lt;?php wp_loginout(); ?&gt; : 显示登录/注销链接<br />
&lt;!–next page–&gt; : 将当前内容分页<br />
&lt;!–more–&gt; : 将当前内容截断，以不在主页/目录页显示全部内容<br />
&lt;?php timer_stop(1); ?&gt; : 网页加载时间(秒)<br />
&lt;?php echo get_num_queries(); ?&gt; : 网页加载查询量</p></blockquote>
<p style="text-align: left;">通过以上两大资源，相信Wordpress模板制作应该很快可以上手，学习中。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blook.org.cn/wordpress-tutorial-templates-to-create-commonly-used-functions/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress模板教程 2.Template Files and Templates &#124; 模板文件和模板</title>
		<link>http://www.blook.org.cn/wordpress-template-tutorial-2-template-files-and-templates-template-files-and-templates/</link>
		<comments>http://www.blook.org.cn/wordpress-template-tutorial-2-template-files-and-templates-template-files-and-templates/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 02:15:42 +0000</pubDate>
		<dc:creator>菠萝</dc:creator>
				<category><![CDATA[资源分享]]></category>
		<category><![CDATA[wordpress模板]]></category>

		<guid isPermaLink="false">http://www.blook.org.cn/?p=362</guid>
		<description><![CDATA[在 WordPress模板教程 1 中，我们一起学习了* 基本规则* 术语 / 行话* 层式结构，在学习WordPress模板教程 2.Template Files and Templates &#124; 模板文件和模板 之前，你必须把教程1先学好!本教程会让你更详细地了解模板文件以及每个页面的结构。 我们需要知道的是，每个页面都是由多个模板文件构成的。 下面我们看一下首页文件： 在上面的例子，我们可以看出首页是由4个模板文件组成： header.php，index.php，sidebar.php 和 footer.php。 Header 模板文件: 通常在这个文件中包含你博客的标题（title）和描述（description）。而且它们通常在整个博客中保持一致。 Index 模板文件： 这个模板文件包含你的日志的标题，内容（每篇日志的文本和图片）和日志的元数据 （指的是每篇日志的信息，包括谁是作者，什么时候发表，在那个分类下，有多少留言等等）。 Sidebar 模板文件 这个模板文件控制你的页面链接列表，类别链接列表，存档链接列表，blogroll 列表和其他东东。（侧边栏不一定要求布局到右边，我正在使用的主题是经典的两列的 博客布局。） Footer 模板文件： 像 header.php 模板文件一样，footer 通常不会因为页面的改变而改变，你可以在这里放置任何东西，但是通常是版权信息。 现在让我解释为什么上面图片中的 index.php 所在的区域是红色的。Index.php 所在区域是红色是说明那块区域将会改变，取决于你在博客的那个页面。 如果你在单一日志页面，这时候页面将会包含这四个模板文件：header，single，sidebar 和 footer。]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://www.blook.org.cn/wordpress-templates-tutorial-1-intro-introduction/">WordPress模板教程 1</a> 中，我们一起学习了* 基本规则* 术语 / 行话* 层式结构，在学习<a href="http://www.blook.org.cn/template-files…-and-templates">WordPress模板教程 2.Template Files and Templates | 模板文件和模板</a> 之前，你必须把教程1先学好!本教程会让你更详细地了解模板文件以及每个页面的结构。</p>
<p>我们需要知道的是，每个页面都是由多个模板文件构成的。</p>
<p>下面我们看一下首页文件：</p>
<p><img src="http://pic.fairyfish.com/2007/06/index.gif" alt="index.gif" /></p>
<p>在上面的例子，我们可以看出首页是由4个模板文件组成： <strong>header.php</strong>，<strong>index.php</strong>，<strong>sidebar.php</strong> 和 <strong>footer.php</strong>。</p>
<h2><strong>Header 模板文件:</strong></h2>
<p><img src="http://pic.fairyfish.com/2007/06/header-template.gif" alt="header-template.gif" /><br />
通常在这个文件中包含你博客的<strong>标题</strong>（title）和<strong>描述</strong>（description）。而且它们通常在整个博客中保持一致。</p>
<h2><strong>Index 模板文件：</strong></h2>
<p>这个模板文件包含你的<strong>日志的标题</strong>，<strong>内容</strong>（每篇日志的文本和图片）和<strong>日志</strong>的<strong>元数据</strong> （指的是每篇日志的信息，包括谁是作者，什么时候发表，在那个分类下，有多少留言等等）。</p>
<p><img src="http://pic.fairyfish.com/2007/06/index-template.gif" alt="index-template.gif" /></p>
<h2>Sidebar 模板文件</h2>
<p>这个模板文件控制你的<strong>页面链接列表</strong>，<strong>类别链接列表</strong>，<strong>存档链接列表</strong>，<strong>blogroll 列表</strong>和<strong>其他东东</strong>。（侧边栏不一定要求布局到右边，我正在使用的主题是经典的两列的 博客布局。）</p>
<p><img src="http://pic.fairyfish.com/2007/06/sidebar-template.gif" alt="sidebar-template.gif" /></p>
<h2><strong>Footer 模板文件：</strong></h2>
<p><img src="http://pic.fairyfish.com/2007/06/footer-template.gif" alt="footer-template.gif" /></p>
<p>像 header.php 模板文件一样，footer 通常不会因为页面的改变而改变，你可以在这里放置任何东西，但是通常是<strong>版权信息</strong>。</p>
<p>现在让我解释为什么上面图片中的 index.php 所在的区域是红色的。Index.php 所在区域是红色是说明那块区域将会改变，取决于你在博客的那个页面。</p>
<p>如果你在单一日志页面，这时候页面将会包含这四个模板文件：header，<strong>single</strong>，sidebar 和 footer。</p>
<p><img src="http://pic.fairyfish.com/2007/06/single.gif" alt="single.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blook.org.cn/wordpress-template-tutorial-2-template-files-and-templates-template-files-and-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress模板教程 1. Intro &#124; 介绍</title>
		<link>http://www.blook.org.cn/wordpress-templates-tutorial-1-intro-introduction/</link>
		<comments>http://www.blook.org.cn/wordpress-templates-tutorial-1-intro-introduction/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 02:00:35 +0000</pubDate>
		<dc:creator>菠萝</dc:creator>
				<category><![CDATA[资源分享]]></category>
		<category><![CDATA[wordpress模板]]></category>

		<guid isPermaLink="false">http://www.blook.org.cn/?p=360</guid>
		<description><![CDATA[今天开始我将和大家一起来学习 WordPress 模板制作，本教程主要讲： 基本规则 术语 / 行话 层式结构 基本规则： 规则 #1：以正确顺序关闭所有标签。在错误关闭标签的方法中，关闭的 ul 标签是不按次序的。 每个标签都是在 &#60; 和 &#62; 中，是否有斜线 /，则指明这个标签是开始标签还是结束标签。如：&#60;&#62; 是开始标签，而&#60;/&#62; 是结束标签。在上面的例子中，我使用 ul（无序列表）li （列表元素）标签。注意开始和结束 li 标签在开始和结束 ul 标签的里面，这就是标签正确嵌套。 规则 #2：每个主题至少有这两个文件 &#8211; style.css 和 index.php。index.php 告诉你的主题所有的元素该如何布局，style.css 则告诉你主题所有的元素该如何展示。下面是完整的主题文件列表（现在不用担心这个列表）： style.css index.php home.php single.php page.php archive.php category.php search.php 404.php comments.php comments-popup.php author.php date.php 专业术语： Template（模板） &#8212; 其实就是一个代码集，很多地方会利用到这个代码集，把它整合成一个代码集，就不必一遍遍输入这些重复代码。 Template file（模板文件） &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>今天开始我将和大家一起来学习 WordPress 模板制作，本教程主要讲：</p>
<ul>
<li>基本规则</li>
<li>术语 / 行话</li>
<li>层式结构</li>
</ul>
<h2>基本规则：</h2>
<ul>
<li><strong>规则 #1</strong>：以正确顺序关闭所有标签。<img src="http://pic.fairyfish.com/2007/06/right-and-wrong-of-closing.gif" alt="正确和错误关闭标签的方法" />在错误关闭标签的方法中，关闭的 <strong>ul</strong> 标签是不按次序的。
<p>每个标签都是在 <strong>&lt;</strong> 和 <strong>&gt;</strong> 中，是否有斜线 <strong>/</strong>，则指明这个标签是开始标签还是结束标签。如：<strong>&lt;&gt;</strong> 是开始标签，而<strong>&lt;/&gt;</strong> 是结束标签。在上面的例子中，我使用 <strong>ul</strong>（无序列表）<strong>li</strong> （列表元素）标签。注意开始和结束 <strong>li</strong> 标签在开始和结束 <strong>ul</strong> 标签的里面，这就是标签正确嵌套。</li>
<li><strong>规则 #2</strong>：每个主题至少有这两个文件 &#8211; <strong>style.css</strong> 和 <strong>index.php</strong>。index.php 告诉你的主题所有的元素该如何布局，style.css 则告诉你主题所有的元素该如何展示。下面是完整的主题文件列表（现在不用担心这个列表）：
<ul>
<li>style.css</li>
<li>index.php</li>
<li>home.php</li>
<li>single.php</li>
<li>page.php</li>
<li>archive.php</li>
<li>category.php</li>
<li>search.php</li>
<li>404.php</li>
<li>comments.php</li>
<li>comments-popup.php</li>
<li>author.php</li>
<li>date.php</li>
</ul>
</li>
</ul>
<h2>专业术语：</h2>
<ul>
<li><strong>Template（模板）</strong> &#8212; 其实就是一个代码集，很多地方会利用到这个代码集，把它整合成一个代码集，就不必一遍遍输入这些重复代码。</li>
<li><strong>Template file（模板文件）</strong> &#8212; 一个包含一个或者多个代码集（模板）文件。每个主题是由多个模板文件组成的，如：index.php，style.css，sidebar.php 等等。</li>
<li><strong>Theme（主题）或者 WordPress theme（WordPress 主题）</strong> &#8212; 所有你正在使用的文件：文本，图像，代码等等。注意： WordPress theme（主题）和 WordPress template(s)（模板）是两个不同的东西，尽管有些人认为他们一样。</li>
<li><strong>Post（日志）</strong> &#8212; 现在你读的就是一篇日志。此外，它是你 blog 的一个简单的条目，如：一个页面或者一篇日记。</li>
<li><strong>Page（静态页面）</strong> &#8212; 一种特殊的 post，它不是以分类组织的。它有别于你其他的日志。注意：在 WordPress，page（页面）和 Page（静态页面）是两种不同的东西。</li>
</ul>
<h2>层式结构：</h2>
<p>下面这幅图简单的向你展示，一旦你主题中的某个文件丢失了，WordPress 主题系统将会寻找什么。这里列出了6个文件而不是完整的13个，因为这6个是你需要或更大时间去关注的。在接下来的教程中，你将学到余下的文件。</p>
<p><img src="http://pic.fairyfish.com/2007/06/main-hierarchy.gif" alt="main-hierarchy.gif" /></p>
<p>我们可以通过他们的在图中位置知道他的重要性级别，上面，左边是最重要的，下面和右边是最不重要的</p>
<p>为什么会存在模板文件的层式结构或者说是重要性级别呢？因为如果 archive.php 文件（用来显示存档页面）丢失了，那么 WordPress 将会指定 index.php 去控制存档页面如何显示。</p>
<p>如果 single.php 模板文件丢失了呢，哪个模板文件它会去寻找用来显示单一日志呢？它会寻找 index.php。</p>
<p>希望这第一篇教程能对你有所帮助，也希望一起交流。都是初学者，相互学习才进步更快!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blook.org.cn/wordpress-templates-tutorial-1-intro-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8 兼容的风格列表</title>
		<link>http://www.blook.org.cn/wordpress-2-8-compatible-with-the-style-of-a-list-of/</link>
		<comments>http://www.blook.org.cn/wordpress-2-8-compatible-with-the-style-of-a-list-of/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 03:38:52 +0000</pubDate>
		<dc:creator>菠萝</dc:creator>
				<category><![CDATA[技术荟萃]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress模板]]></category>
		<category><![CDATA[wordpress风格]]></category>

		<guid isPermaLink="false">http://www.blook.org.cn/?p=32</guid>
		<description><![CDATA[随着Wordpress 2.8版本的发布，很多站长都纷纷升级更新到了新的版本，但升级之前，你一定注意了，你的风格是不是与最新的Wordpress 2.8兼容呢？在这里我对一些风格进行了测试，并作以整理，把与Wordpress 2.8兼容的一些风格给罗列在下面，方便大家选择使用： 菠萝导航&#62;&#62; 点击下载新版的Wordpress 2.8 WordPress 2.8 兼容的插件列表 0 &#8211; 9 1 Blog Theme (1.0) A &#8211; D Ad Flex Blog (0.8.9.9.7a) Ad Flex Niche (0.8.9.9.7a) AdFlex SEO (0.9) Admiral Theme (1.0) Amazing Grace (3.0) Artificial Intelligence (1.5) Big Brain Theme (1.0) Bluecube (1.6.1) Blue Grace (3.0) Drive (1.1.0) E &#8211; H Expression [...]]]></description>
			<content:encoded><![CDATA[<p>随着Wordpress 2.8版本的发布，很多站长都纷纷升级更新到了新的版本，但升级之前，你一定注意了，你的风格是不是与最新的Wordpress 2.8兼容呢？在这里我对一些风格进行了测试，并作以整理，把与Wordpress 2.8兼容的一些风格给罗列在下面，方便大家选择使用：</p>
<h2><strong></strong><strong><span style="color: #ff6600;">菠萝导航&gt;&gt;</span></strong></h2>
<p><a href="http://www.blook.org.cn/chinese-version-of-wordpress-2-8-released/">点击下载新版的Wordpress 2.8</a></p>
<p><span><a href="../wordpress-2-8-compatible-plug-ins-list/">WordPress 2.8 兼容的插件列表</a></span></p>
<h3><span> 0 &#8211; 9 </span></h3>
<ul>
<li> <a title="http://1-blog-theme.javier-garcia.com/" href="http://1-blog-theme.javier-garcia.com/">1 Blog Theme</a> (1.0)</li>
</ul>
<p><a id="A_-_D" name="A_-_D"></a></p>
<h3><span> A &#8211; D </span></h3>
<ul>
<li> <a title="http://www.vklabs.com/wordpress-themes/wordpress-theme-ad-flex-blog.php" href="http://www.vklabs.com/wordpress-themes/wordpress-theme-ad-flex-blog.php">Ad Flex Blog</a> (0.8.9.9.7a)</li>
<li> <a title="http://www.vklabs.com/wordpress-themes/wordpress-theme-ad-flex-niche.php" href="http://www.vklabs.com/wordpress-themes/wordpress-theme-ad-flex-niche.php">Ad Flex Niche</a> (0.8.9.9.7a)</li>
<li> <a title="http://www.adflexseo.com/" href="http://www.adflexseo.com/">AdFlex SEO</a> (0.9)</li>
<li> <a title="http://www.harrr.org/rrr/admiral-theme/" href="http://www.harrr.org/rrr/admiral-theme/">Admiral Theme</a> (1.0)</li>
<li> <a title="http://www.prelovac.com/vladimir/wordpress-themes/amazing-grace" href="http://www.prelovac.com/vladimir/wordpress-themes/amazing-grace">Amazing Grace</a> (3.0)</li>
<li> <a title="http://ericulous.com/2007/02/09/wp-theme-artificial-ntelligence/" href="http://ericulous.com/2007/02/09/wp-theme-artificial-ntelligence/">Artificial Intelligence</a> (1.5)</li>
<li> <a title="http://www.harrr.org/rrr/bigbrain/" href="http://www.harrr.org/rrr/bigbrain/">Big Brain Theme</a> (1.0)</li>
<li> <a title="http://www.theenglishguy.co.uk/bluecube-theme/" href="http://www.theenglishguy.co.uk/bluecube-theme/">Bluecube</a> (1.6.1)</li>
<li> <a title="http://www.prelovac.com/vladimir/wordpress-themes/blue-grace" href="http://www.prelovac.com/vladimir/wordpress-themes/blue-grace">Blue Grace</a> (3.0)</li>
<li> <a title="http://www.theenglishguy.co.uk/drive-theme/" href="http://www.theenglishguy.co.uk/drive-theme/">Drive</a> (1.1.0)</li>
</ul>
<p><a id="E_-_H" name="E_-_H"></a></p>
<h3><span> E &#8211; H </span></h3>
<ul>
<li> <a title="http://www.theenglishguy.co.uk/expression-blue-wordpress-theme/" href="http://www.theenglishguy.co.uk/expression-blue-wordpress-theme/">Expression Blue</a> (1.0.1)</li>
<li> <a title="http://ericulous.com/2008/01/02/wp-theme-fashionista/" href="http://ericulous.com/2008/01/02/wp-theme-fashionista/">Fashionista</a> (1.2)</li>
<li> <a title="http://ericulous.com/2009/02/03/wp-theme-food-recipe/" href="http://ericulous.com/2009/02/03/wp-theme-food-recipe/">Food Recipe</a> (1.0)</li>
<li> <a title="http://www.theenglishguy.co.uk/future-day-theme/" href="http://www.theenglishguy.co.uk/future-day-theme/">Future Day</a> (1.0.3)</li>
<li> <a title="http://www.pross.org.uk/389/garland-revisited-wordpress-theme.html" href="http://www.pross.org.uk/389/garland-revisited-wordpress-theme.html">Garland-Revisited</a> (1.1)</li>
<li> <a title="http://ericulous.com/2007/05/21/wp-theme-genkitheme/" href="http://ericulous.com/2007/05/21/wp-theme-genkitheme/">GenkiTheme</a> (1.4.1)</li>
<li> <a title="http://ericulous.com/2007/09/11/wp-theme-genkitheme-fixed-width/" href="http://ericulous.com/2007/09/11/wp-theme-genkitheme-fixed-width/">GenkiTheme (Fixed Width)</a> (1.4)</li>
<li> <a title="http://ericulous.com/2008/09/09/wp-theme-google-chrome/" href="http://ericulous.com/2008/09/09/wp-theme-google-chrome/">Google Chrome</a> (1.1)</li>
<li> <a title="http://ericulous.com/2006/12/10/wp-theme-greyblog/" href="http://ericulous.com/2006/12/10/wp-theme-greyblog/">GreyBlog</a> (1.6)</li>
</ul>
<p><a id="I_-_L" name="I_-_L"></a></p>
<h3><span> I &#8211; L </span></h3>
<ul>
<li> <a title="http://www.theenglishguy.co.uk/ikon-wordpress-theme/" href="http://www.theenglishguy.co.uk/ikon-wordpress-theme/">Ikon</a> (1.0.0)</li>
<li> <a title="http://ericulous.com/2007/01/29/wp-theme-internet-center/" href="http://ericulous.com/2007/01/29/wp-theme-internet-center/">Internet Center</a> (1.5)</li>
<li> <a title="http://ericulous.com/2007/01/19/wp-theme-internet-music/" href="http://ericulous.com/2007/01/19/wp-theme-internet-music/">Internet Music</a> (1.5)</li>
<li> <a title="http://ericulous.com/2007/01/08/wp-theme-internet-sharing/" href="http://ericulous.com/2007/01/08/wp-theme-internet-sharing/">Internet Sharing</a> (1.5)</li>
<li> <a title="http://dancollier.org/Kolvik/" href="http://dancollier.org/Kolvik/">Kolvik</a> (0.9)</li>
<li> <a title="http://lacenenta.javier-garcia.com/" href="http://lacenenta.javier-garcia.com/">Lacenenta</a> (1.4)</li>
</ul>
<p><a id="M_-_P" name="M_-_P"></a></p>
<h3><span> M &#8211; P </span></h3>
<ul>
<li> <a title="http://www.onehertz.com/portfolio/wordpress/mandigo/" href="http://www.onehertz.com/portfolio/wordpress/mandigo/">Mandigo</a> (1.41)</li>
<li> <a title="http://www.theenglishguy.co.uk/natural-green-wordpress-theme/" href="http://www.theenglishguy.co.uk/natural-green-wordpress-theme/">Natural Green</a> (1.0.0)</li>
<li> <a title="http://www.theenglishguy.co.uk/news-print-v20-theme/" href="http://www.theenglishguy.co.uk/news-print-v20-theme/">News Print v2.0</a> (2.2.1)</li>
<li> <a title="http://www.theenglishguy.co.uk/news-print-v3-theme/" href="http://www.theenglishguy.co.uk/news-print-v3-theme/">News Print v3.0</a> (3.0.4)</li>
<li> <a title="http://www.martialdevelopment.com/blog/ninja-scroll-theme-for-wordpress-v21/" href="http://www.martialdevelopment.com/blog/ninja-scroll-theme-for-wordpress-v21/">Ninja Scroll</a> (1.1)</li>
<li> <a title="http://www.theenglishguy.co.uk/openair-theme/" href="http://www.theenglishguy.co.uk/openair-theme/">OpenAir</a> (1.3.0)</li>
<li> <a title="http://ericulous.com/2006/12/22/wp-theme-orange-web-20/" href="http://ericulous.com/2006/12/22/wp-theme-orange-web-20/">Orange Web 2.0</a> (1.5)</li>
</ul>
<p><a id="Q_-_T" name="Q_-_T"></a></p>
<h3><span> Q &#8211; T </span></h3>
<ul>
<li> <a title="http://www.quickonlinetips.com/archives/quickpress/" href="http://www.quickonlinetips.com/archives/quickpress/">QuickPress</a> (1.5.1)</li>
<li> <a title="http://www.quickonlinetips.com/archives/quickchic/" href="http://www.quickonlinetips.com/archives/quickchic/">QuickChic</a> (1.0)</li>
<li> <a title="http://www.quickonlinetips.com/archives/quickpic/" href="http://www.quickonlinetips.com/archives/quickpic/">QuickPic</a> (1.2)</li>
<li> <a title="http://ericulous.com/2007/01/13/wp-theme-red-business/" href="http://ericulous.com/2007/01/13/wp-theme-red-business/">Red Business</a> (1.5)</li>
<li> <a title="http://blogbuildingu.com/retrospective" href="http://blogbuildingu.com/retrospective">Retrospective</a> (0.9.1)</li>
<li> <a title="http://www.onehertz.com/portfolio/wordpress/royale/" href="http://www.onehertz.com/portfolio/wordpress/royale/">Royale</a> (1.5.1)</li>
<li> <a title="http://ericulous.com/2008/11/27/wp-theme-scrapbook/" href="http://ericulous.com/2008/11/27/wp-theme-scrapbook/">Scrapbook</a> (1.0)</li>
<li> <a title="http://ericulous.com/2007/01/01/wp-theme-small-studio/" href="http://ericulous.com/2007/01/01/wp-theme-small-studio/">Small Studio</a> (1.5)</li>
<li> <a title="http://www.onehertz.com/portfolio/wordpress/smw/" href="http://www.onehertz.com/portfolio/wordpress/smw/">SMW</a> (1.0)</li>
<li> <a title="http://ericulous.com/2008/01/10/wp-theme-softwareholic/" href="http://ericulous.com/2008/01/10/wp-theme-softwareholic/">SoftwareHolic</a> (1.5)</li>
<li> <a title="http://wphackr.com/themes/" href="http://wphackr.com/themes/">This Just In!</a> (2.8)</li>
</ul>
<p><a id="U_-_Z" name="U_-_Z"></a></p>
<h3><span> U &#8211; Z </span></h3>
<ul>
<li> <a title="http://ericulous.com/2009/03/18/wp-theme-woogle-the-google-search-engine-clone/" href="http://ericulous.com/2009/03/18/wp-theme-woogle-the-google-search-engine-clone/">Woogle</a> (1.0)</li>
<li> <a title="http://www.yvoschaap.com/wpthemegen/" href="http://www.yvoschaap.com/wpthemegen/">WordPress Theme Generator</a></li>
</ul>
<p><a id="Non-Compatible_Themes_.28or_Works_Conditionally.29" name="Non-Compatible_Themes_.28or_Works_Conditionally.29"></a></p>
<h2><span> Non-Compatible Themes (or Works Conditionally) </span></h2>
<p><a id="A_-_D_2" name="A_-_D_2"></a></p>
<h3><span> A &#8211; D </span></h3>
<p><a id="E_-_H_2" name="E_-_H_2"></a></p>
<h3><span> E &#8211; H </span></h3>
<ul>
<li> <a title="http://web2feel.com/forum/viewtopic.php?f=2&amp;t=419" href="http://web2feel.com/forum/viewtopic.php?f=2&amp;t=419">Epsilon </a> categories not displayed properly in Epsilon Theme Options, needs this fix: <a title="https://core.trac.wordpress.org/changeset/11574" href="https://core.trac.wordpress.org/changeset/11574">https://core.trac.wordpress.org/changeset/11574</a></li>
</ul>
<p><a id="I_-_L_2" name="I_-_L_2"></a></p>
<h3><span> I &#8211; L </span></h3>
<p><a id="M_-_P_2" name="M_-_P_2"></a></p>
<h3><span> M &#8211; P </span></h3>
<ul>
<li> <a title="http://themehybrid.com/themes/options" href="http://themehybrid.com/themes/options">Options</a> by Justin Tadlock; for details, see <a title="http://wordpress.org/support/topic/278930?replies=7#post-1099903" href="http://wordpress.org/support/topic/278930?replies=7#post-1099903">this wordpress.org support thread</a></li>
<li> <a title="http://kailoon.com/premium-wordpress-theme-giveaway-our-magazine/" href="http://kailoon.com/premium-wordpress-theme-giveaway-our-magazine/">Our Magazine</a> categories in admin don&#8217;t work, needs this fix: <a title="https://core.trac.wordpress.org/changeset/11574" href="https://core.trac.wordpress.org/changeset/11574">https://core.trac.wordpress.org/changeset/11574</a></li>
</ul>
<p><a id="Q_-_T_2" name="Q_-_T_2"></a></p>
<h3><span> Q &#8211; T </span></h3>
<ul>
<li> <a title="http://justintadlock.com/archives/2007/12/09/structure-wordpress-theme" href="http://justintadlock.com/archives/2007/12/09/structure-wordpress-theme">Structure</a> 1.2 by Justin Tadlock; for details, see <a title="http://wordpress.org/support/topic/278930?replies=7#post-1099903" href="http://wordpress.org/support/topic/278930?replies=7#post-1099903">this wordpress.org support thread</a></li>
</ul>
<p><a id="U_-_Z_2" name="U_-_Z_2"></a></p>
<h3><span> U &#8211; Z </span></h3>
<ul>
<li> <a title="http://web2feel.com/forum/viewtopic.php?f=2&amp;t=10" href="http://web2feel.com/forum/viewtopic.php?f=2&amp;t=10">ZinMag Remedy</a> categories not working, needs this fix: <a title="https://core.trac.wordpress.org/changeset/11574" href="https://core.trac.wordpress.org/changeset/11574">https://core.trac.wordpress.org/changeset/11574</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blook.org.cn/wordpress-2-8-compatible-with-the-style-of-a-list-of/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

