<?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; Thesis</title>
	<atom:link href="http://www.gexiaofei.com/tag/thesis/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gexiaofei.com</link>
	<description>惟愿生活简单前行</description>
	<lastBuildDate>Wed, 08 Apr 2009 15:48:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>创建Thesis的自定义页面</title>
		<link>http://www.gexiaofei.com/20090306598.html</link>
		<comments>http://www.gexiaofei.com/20090306598.html#comments</comments>
		<pubDate>Fri, 06 Mar 2009 03:36:45 +0000</pubDate>
		<dc:creator>天眞</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Thesis]]></category>
		<category><![CDATA[Wordpress主题]]></category>

		<guid isPermaLink="false">http://www.gexiaofei.com/?p=598</guid>
		<description><![CDATA[最近把博客换到了Chris Pearson开发的Thesis主题，感觉非常强大，折腾Thesis也成了这几天的主要事情。网上有部分关于thesis的修改教程，但是更多的资料还是在收费会员才能查阅的论坛中，真是比较遗憾。 昨天因为要建立一个搜索结果的结果页面，要使用custom page templates，在网上找了N久都没发现如何在Thesis里建立自定义页面。只好反反复复的折腾，最后找到了办法，分享如下。 首先在创建页面（Page）的时候选择template为custom template。记下page的ID。 然后在custom_functions.php里面根据自己需要添加以下代码： [php] //自定义搜索页面 function my_page() { if (is_page(&#8217;592&#8242;)) /*你的页面ID*/ { ?> //下面基本套用thesis现有的html代码 页面标题 你的页面内容，可以使用php或者html代码 //添加sidebar]]></description>
			<content:encoded><![CDATA[<p></p><p>最近把博客换到了<a href="http://www.pearsonified.com/">Chris Pearson</a>开发的Thesis主题，感觉非常强大，折腾<a href="http://diythemes.com/?a_aid=feir">Thesis</a>也成了这几天的主要事情。网上有部分关于thesis的修改教程，但是更多的资料还是在收费会员才能查阅的论坛中，真是比较遗憾。</p>
<p>昨天因为要建立一个搜索结果的结果页面，要使用custom page templates，在网上找了N久都没发现如何在Thesis里建立自定义页面。只好反反复复的折腾，最后找到了办法，分享如下。</p>
<p>首先在创建页面（Page）的时候选择template为custom template。记下page的ID。</p>
<p>然后在custom_functions.php里面根据自己需要添加以下代码：<br />
[php]<br />
//自定义搜索页面<br />
function my_page() {<br />
if (is_page(&#8217;592&#8242;)) /*你的页面ID*/<br />
{ ?><br />
//下面基本套用thesis现有的html代码</p>
<div id="content">
<div class="post_box">
<div class="headline_area">
<h2>页面标题</h2>
</div>
<p>你的页面内容，可以使用php或者html代码
</p></div>
</div>
<p>//添加sidebar</p>
<div id="sidebars">
<?php thesis_build_sidebars(); ?>
</div>
<p><?php<br />
}<br />
}<br />
//去掉thesis默认的自定义模板，加载自己的模板<br />
remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');<br />
add_action('thesis_hook_custom_template', 'my_page');<br />
[/php]</p>
<p>要建立其他自定义页面只要在custom_functions.php里面添加新的function就可以了。另外关于hooks的介绍，可以参照Charles的<a href="http://sexywp.com/try-to-explain-hook-in-wp.htm">浅析WordPress中的Hook机制</a>，以及<a href="http://www.sugarrae.com/thesis-hooks-dummies-tutorial/">Thesis Hooks使用的教程</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gexiaofei.com/20090306598.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
