<?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>MarsLau&#039;s Blog &#187; 主题</title>
	<atom:link href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98/feed" rel="self" type="application/rss+xml" />
	<link>http://marslau.com</link>
	<description>Mars博客，记录路上的点滴（个人日记 设计 css wordpress seo）</description>
	<lastBuildDate>Sat, 21 Apr 2012 01:17:50 +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主题5styles</title>
		<link>http://marslau.com/archives/454.html</link>
		<comments>http://marslau.com/archives/454.html#comments</comments>
		<pubDate>Wed, 22 Jul 2009 02:27:29 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[5styles]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[原创]]></category>

		<guid isPermaLink="false">http://marslau.com/?p=454</guid>
		<description><![CDATA[WordPress主题5styles是我正式发布的第二款原创主题。界面整洁、明快，五种纯div+css样式打造的博客布局，自由切换并有浏览器缓存，方便浏览者找到自适宽度浏览... <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="112" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题RBcss发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F330.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106829.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题RBcss发布</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题amarketer发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F397.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题amarketer发布</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F224.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106768.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress主题结构层次图</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F16.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 主题简明教程</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F86.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/10/05/8581088.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !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>WordPress主题5styles是我正式发布的第二款原创主题。较通用，没有添加太多的功能，使用者可更方便在其上添加所需功能。</p>
<h4>WordPress主题5styles特点：</h4>
<p>界面整洁、明快，五种纯div+css样式打造的博客布局，自由切换并有浏览器缓存，方便浏览者找到自适宽度浏览。</p>
<p>中文；两栏，左右侧栏自由切换；支持Widget；支持Gravatar；兼容IE6、IE7、IE8、Firefox等常规浏览器。</p>
<h4>5styles界面图片：</h4>
<p><img src="http://marslau.com/wp-content/uploads/2009/07/screenshot.png" alt="WordPress主题5styles" width="300" height="225" /></p>
<h4>所需插件：</h4>
<p><a title="中文 WordPress 工具箱" href="http://marslau.com/archives/136.html">中文 WordPress 工具箱</a>、<a href="http://lesterchan.net/portfolio/programming.php" target="_blank">WP-PostViews</a>、<a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/" target="_blank">WordPress Related Posts</a>、<a href="http://lesterchan.net/portfolio/programming.php">WP-PageNavi</a></p>
<h4>预览与下载：</h4>
<p><img src="http://marslau.com/wp-content/uploads/2009/03/star.gif" alt="star.gif" width="16" height="16" /> <a href="http://wp-themes.marslau.com/?wptheme=5styles" target="_blank"><strong>预览</strong> </a><img src="http://marslau.com/wp-content/uploads/2009/03/download-icon.gif" alt="download-icon.gif" width="16" height="16" /> <a title="wp-themes-5styles-download" href="http://marslau.com/download/wp-themes-5styles.zip" target="_blank"><strong>本地下载</strong></a> | <a title="wp-themes-5styles-download" href="http://www.box.net/shared/2hz3p7e129" target="_blank"><strong>站外下载</strong></a></p>
<h4>更新1</h4>
<p>有网友反映该主题的字体偏小、颜色偏浅。请自行修改样式表，修改方法如下：</p>
<p>1、如果想修改文章的字体。<br />
打开主题中的style.css文件；<br />
找到</p>
<pre class="brush: css; title: ; notranslate">.entry{ margin: 8px 0; padding:0px; line-height:22px;}</pre>
<p>添加字体大小和前景色样式</p>
<pre class="brush: css; title: ; notranslate">.entry{ margin: 8px 0; padding:0px; line-height:22px;font-size:14px;color:#000;}</pre>
<p>2、如果想修改整个的字体。<br />
请按上述方法修改body里的对应属性</p>
<ul class="related_post"><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-11-02 -- <a href="http://marslau.com/archives/564.html" title="我的文章我做主，分享别人获益自己">我的文章我做主，分享别人获益自己</a> (17)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/454.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/5styles" rel="tag">5styles</a>, <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e5%8e%9f%e5%88%9b" rel="tag">原创</a><br/>
</small></p><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="112" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题RBcss发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F330.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106829.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题RBcss发布</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题amarketer发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F397.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题amarketer发布</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F224.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106768.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress主题结构层次图</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F16.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 主题简明教程</font>
                    </a>
                </td>
                <td width="112" 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%2Fmarslau.com%2Farchives%2F86.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/10/05/8581088.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !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>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/454.html/feed</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
		<item>
		<title>wordpress主题切换预览插件：Theme Switcher Reloaded</title>
		<link>http://marslau.com/archives/443.html</link>
		<comments>http://marslau.com/archives/443.html#comments</comments>
		<pubDate>Sun, 19 Jul 2009 02:51:56 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://marslau.com/archives/443.html</guid>
		<description><![CDATA[Theme Switcher Reloaded是一款wordpress主题切换预览插件，可以用于博客换肤，也可以较好解决demo演示主题的功... <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="112" valign="top" style="padding: 5px !important; margin: 0 !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%2Fmarslau.com%2Farchives%2F828.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F443.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2012/03/07/16652087.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress插件推荐：多说评论系统</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题5styles" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F454.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F443.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106743.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题5styles</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F361.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F443.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106943.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题RBcss发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F330.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F443.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/site_images/2011/11/01/10106829.png" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题RBcss发布</font>
                    </a>
                </td>
                <td width="112" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题amarketer发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fmarslau.com%2Farchives%2F397.html&from=http%3A%2F%2Fmarslau.com%2Farchives%2F443.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 106px !important; height: 106px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="106px" height="106px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 112px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题amarketer发布</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>Theme Switcher Reloaded是一款wordpress主题切换预览插件，可以用于博客换肤，也可以较好解决demo演示主题的功能。在此感谢<a title="showfom" href="http://showfom.com/" target="_blank">showfom</a>向我推荐，并提供测试数据库。</p>
<p><img src="http://marslau.com/wp-content/uploads/2009/07/theme-switcher-reloaded.png" alt="Theme Switcher Reloaded.png" width="169" height="99" /></p>
<p><strong>下载地址：</strong><a href="http://themebot.com/webmaster-tools/1-wordpress-theme-switcher-reloaded">http://themebot.com/webmaster-tools/1-wordpress-theme-switcher-reloaded</a></p>
<p><strong>安装：</strong></p>
<li style="MARGIN-LEFT: 2em">1.下载解压上传至/wp-content/plugins/下</li>
<li style="MARGIN-LEFT: 2em">2.在后台的管理插件里启用插件</li>
<li style="MARGIN-LEFT: 2em">3.启用widget，并在侧栏中添加Theme Switcher Reloaded</li>
<p><strong>主题访问地址：</strong>http://域名/ ?wptheme=主题名</p>
<p><strong>注意：</strong><span style="COLOR: #ff0000">该插件只适用支持widget的主题</span></p>
<p>之前写过一些主题RBcss、Amarketer等，都是找别的博客演示。现在知道 Theme Switcher Reloaded 这个插件，就方便多了。见：<a href="http://wp-themes.marslau.com/">http://wp-themes.marslau.com/</a></p>
<ul class="related_post"><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-10-16 -- <a href="http://marslau.com/archives/136.html" title="中文 WordPress 工具箱">中文 WordPress 工具箱</a> (12)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/443.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/demo" rel="tag">demo</a>, <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e6%8f%92%e4%bb%b6" rel="tag">插件</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/443.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress主题amarketer发布</title>
		<link>http://marslau.com/archives/397.html</link>
		<comments>http://marslau.com/archives/397.html#comments</comments>
		<pubDate>Sun, 17 May 2009 03:22:47 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[amarketer]]></category>
		<category><![CDATA[主题]]></category>

		<guid isPermaLink="false">http://marslau.com/archives/397.html</guid>
		<description><![CDATA[WordPress清新主题amarketer是我为本站设计的第二款主题。首款主题只能在这里看看效果图片了。 由于该主题是专门为自己打造的，没有考虑过通用的代码，所以一直没有发布，很多网友向我要的... ]]></description>
			<content:encoded><![CDATA[<p>WordPress清新主题amarketer是我为本站设计的第二款主题。首款主题只能在<a href="http://marslau.com/archives/137.html" target="_blank">这里</a>看看效果图片了。</p>
<p>由于该主题是专门为自己打造的，没有考虑过通用的代码，所以一直没有发布，很多网友向我要的时候也不好意思供他们使用。但最终遇见了一位热心的博友<a rel="external nofollow" href="http://marslau.com/?r=http://www.simpleseo.cn/simplelife/siting-diary"><span style="color: #148ec0;">思亭</span></a>，抽出自己的时间将模板整理重写，并在论坛上发表了一下，在这正式感谢一下。</p>
<p><img src="http://marslau.com/wp-content/uploads/2009/05/amarketer-wordpress-theme.png" alt="amarketer-WordPress-theme.png" width="500" height="304" /></p>
<p><strong>amarketer主题特性：<br />
</strong>清爽蓝色；支持Gravatar；兼容IE6、IE7、IE8、Firefox、chrome等浏览器。</p>
<p><strong>所需插件：<br />
</strong><a title="中文 WordPress 工具箱" href="http://marslau.com/archives/136.html">中文 WordPress 工具箱</a>、<a href="http://lesterchan.net/portfolio/programming.php" target="_blank">WP-PostViews</a>、<a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/" target="_blank">WordPress Related Posts</a>、<a href="http://lesterchan.net/portfolio/programming.php">WP-PageNavi</a></p>
<p><strong>预览与下载：<br />
</strong><img src="http://marslau.com/wp-content/uploads/2009/03/star.gif" alt="star.gif" width="16" height="16" /> <strong>预览：本站</strong> <img src="http://marslau.com/wp-content/uploads/2009/03/download-icon.gif" alt="download-icon.gif" width="16" height="16" /> <a title="wordpress主题amarketer下载" href="http://marslau.com/download/amarketer.zip" target="_blank"><strong>下载</strong></a></p>
<p><strong>主题更新：</strong></p>
<p>主题的留言板page页面：<a title="wordpress主题amarketer下载" href="http://marslau.com/download/amarketer-guestbook.zip" target="_blank"><strong>下载</strong></a></p>
<p>主题的首页home.php：<a title="wordpress主题amarketer下载" href="http://marslau.com/download/amarketer-home.zip" target="_blank"><strong>下载</strong></a></p>
<ul class="related_post"><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/397.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/amarketer" rel="tag">amarketer</a>, <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/397.html/feed</wfw:commentRss>
		<slash:comments>86</slash:comments>
		</item>
		<item>
		<title>WordPress主题RBcss发布</title>
		<link>http://marslau.com/archives/330.html</link>
		<comments>http://marslau.com/archives/330.html#comments</comments>
		<pubDate>Thu, 12 Mar 2009 10:26:40 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[CSS样式]]></category>
		<category><![CDATA[RBcss]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://marslau.com/?p=330</guid>
		<description><![CDATA[红黑主题RBcss设计和制作时没有使用一张图片，没有用到JS，纯粹的div+css，大大减小了网站的体积，提升页面加载速度，加上注意了部分SEO技巧，相信纯CSS的RBcss主题对博客的推广有一定的好处... ]]></description>
			<content:encoded><![CDATA[<p>写过不少WordPress主题模板，但一直没有发布过，最近做了RBcss。</p>
<p>做RBcss主题的初衷是简单、通用。因此在主题模板设计和制作时没有使用一张图片，没有用到JS，纯粹的div+css，大大减小了网站的体积，提升页面加载速度，加上注意了部分SEO技巧，相信纯CSS的RBcss主题对博客的推广有一定的好处。</p>
<p>RBcss主题色调是经典的红黑搭配，这也是我一直想尝试的色调搭配，又因为是纯CSS的，所以主题名称也是由此命名的RBcss：Red+Black+css。</p>
<p><strong>图片预览：</strong></p>
<p><img style="margin: 5px;" title="纯CSS的wordpress主题RBcss" src="http://marslau.com/wp-content/uploads/2009/03/screenshot.png" alt="screenshot.png" width="300" height="225" /><br />
<img style="margin: 5px;" title="纯CSS的wordpress主题RBcss" src="http://marslau.com/wp-content/uploads/2009/03/rbcss-1.png" alt="RBcss_1.png" width="364" height="262" /><br />
<strong>RBcss主题特性：</strong></p>
<p>两栏；黑红色；支持Widget；支持Gravatar；通过 XHTML 1.1 和 CSS 3 验证；兼容IE6、IE7、IE8、Firefox、chrome等浏览器。</p>
<p>可以根据需要添加<a href="http://lesterchan.net/portfolio/programming.php" target="_blank">WP-PostViews</a>、<a href="http://fairyfish.net/2007/09/12/wordpress-23-related-posts-plugin/" target="_blank">WordPress Related Posts</a>、<a href="http://lesterchan.net/portfolio/programming.php">WP-PageNavi</a>等常用插件。<br />
<strong>预览与下载：</strong></p>
<p><img src="http://marslau.com/wp-content/uploads/2009/03/star.gif" alt="star.gif" width="16" height="16" /> <strong><a title="纯CSS的wordpress主题RBcss预览" href="http://freefeet.net/" target="_blank">预览</a></strong></p>
<p><strong><img src="http://marslau.com/wp-content/uploads/2009/03/download-icon.gif" alt="download-icon.gif" width="16" height="16" /> <a title="纯CSS的wordpress主题RBcss下载" onclick="pageTracker._trackPageview('/download/rbcss');" href="http://marslau.com/download/RBcss.zip" target="_blank">下载（无需插件）</a></strong></p>
<p><strong><img src="http://marslau.com/wp-content/uploads/2009/03/download-icon.gif" alt="download-icon.gif" width="16" height="16" /> <a title="纯CSS的wordpress主题RBcss下载" onclick="pageTracker._trackPageview('/download/rbcss');" href="http://marslau.com/download/RBcss+plugins.zip" target="_blank">下载（需WP-PostViews、WordPress Related Posts、WP-PageNavi插件）</a></strong></p>
<p><strong><span style="color: #ff0000;">更新：</span></strong></p>
<p><span>1、3月14日：改正了使用Widget时侧栏标题调错样式的问题。</span></p>
<ul class="related_post"><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-09-10 -- <a href="http://marslau.com/archives/514.html" title="5个css布局的常见问题及解决方法">5个css布局的常见问题及解决方法</a> (10)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/330.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/css%e6%a0%b7%e5%bc%8f" rel="tag">CSS样式</a>, <a href="http://marslau.com/archives/tag/rbcss" rel="tag">RBcss</a>, <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e6%a8%a1%e6%9d%bf" rel="tag">模板</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/330.html/feed</wfw:commentRss>
		<slash:comments>79</slash:comments>
		</item>
		<item>
		<title>wordpress主题结构层次图</title>
		<link>http://marslau.com/archives/224.html</link>
		<comments>http://marslau.com/archives/224.html#comments</comments>
		<pubDate>Fri, 28 Nov 2008 08:19:46 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[层次]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://marslau.com/?p=224</guid>
		<description><![CDATA[整理资料时发现了一张不知什么时候，在什么网站下的一张wordpress主题模板结构图。 这张wordpress模板结构图，能在你写主题提供很清晰的思路。 2009-03-12 -- WordPress主题RBcss发布 (79)2008-08-25 -- Word... ]]></description>
			<content:encoded><![CDATA[<p>整理资料时发现了一张不知什么时候，在什么网站下的一张wordpress主题模板结构图。</p>
<p><a href="http://marslau.com/wp-content/uploads/2008/11/template_hierarchy.png"><img class="alignnone size-medium wp-image-225" title="template_hierarchy" src="http://marslau.com/wp-content/uploads/2008/11/template_hierarchy.png" alt="" width="600" height="476" /></a></p>
<p>这张wordpress模板结构图，能在你写主题提供很清晰的思路。</p>
<ul class="related_post"><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/224.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e5%b1%82%e6%ac%a1" rel="tag">层次</a>, <a href="http://marslau.com/archives/tag/%e6%a8%a1%e6%9d%bf" rel="tag">模板</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/224.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>给Blog换新主题</title>
		<link>http://marslau.com/archives/137.html</link>
		<comments>http://marslau.com/archives/137.html#comments</comments>
		<pubDate>Mon, 20 Oct 2008 05:51:59 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>

		<guid isPermaLink="false">http://marslau.com/?p=137</guid>
		<description><![CDATA[真的已经迫不及待了,尽管还有太多需要修改的地方，我已经忍不住了把新的wordpress主题先换上去。毕竟任何事不可能一下子就能完美，以后可以慢慢修改。 首先，还要对自己的旧主题Say:bye-bye.... ]]></description>
			<content:encoded><![CDATA[<p>真的已经迫不及待了,尽管还有太多需要修改的地方，我已经忍不住了把新的wordpress主题先换上去。毕竟任何事不可能一下子就能完美，以后可以慢慢修改。<br />
首先，还要对自己的旧主题Say:bye-bye.截个图作为纪念吧，毕竟用了很长时间了。</p>
<p><img class="alignnone size-full wp-image-138" title="marslau-10" src="http://marslau.com/wp-content/uploads/2008/10/marslau-10.gif" alt="旧主题截图" /></p>
<p>新主题写的时候兼容了Firefox、ie6、ie7、chrome等浏览器，我想这对大多数网友应该足够了。如有出错的地方希望能给予指正。<br />
功能上比老版的主题添加了Gravatar头像，侧栏添加了tab标签，结构看起来也应该会规整一点儿。<br />
希望新wordpress主题能给博友们不错的感觉，至少要比以前的好点。</p>
<ul class="related_post"><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/137.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/137.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress搭建企业网站</title>
		<link>http://marslau.com/archives/86.html</link>
		<comments>http://marslau.com/archives/86.html#comments</comments>
		<pubDate>Mon, 25 Aug 2008 09:40:39 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[企业]]></category>
		<category><![CDATA[企业网站]]></category>
		<category><![CDATA[模板]]></category>

		<guid isPermaLink="false">http://marslau.com/archives/86.html</guid>
		<description><![CDATA[WordPress是基于文章的博客程序，而企业或产品网站也是基于一篇篇的文章，所以用WordPress搭建企业网站或产品网站是可行的,本文讲述了用wordpress搭建中小企业网站或产品网站的思路... ]]></description>
			<content:encoded><![CDATA[<p>在看该文档之前需要对WordPress主题模板的层次架构有一定的了解。简单介绍如图：</p>
<p><img src="/wp-content/uploads/2008/08/wp-enterprise-template.png" alt="" /></p>
<p> </p>
<p>更详细的WordPress主题模板的结构层次请见：<a title="wordpress主题结构层次图" href="http://marslau.com/archives/224.html">wordpress主题结构层次图</a></p>
<h4>一．WordPress搭建中小企业网站思路</h4>
<p>WordPress是基于文章的博客程序，而企业或产品网站也是基于一篇篇的文章，所以用WordPress搭建企业网站是可行的。用WordPress建中小企业站模板的思路如下：</p>
<p>1)  大分类+子分类：</p>
<p>首先，根据需求明确企业网站的整体结构，需要几大类的内容，如分为1产品介绍，2技术中心，3关于我们，4 试用购买，这些内容可以放在网站的主菜单上。</p>
<p>然后，细化企业网站结构，既明确子分类，如：</p>
<p><img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-1-1.png" alt="" height="208" /></p>
<p>由上图可以清晰的了解网站的结构，上图中 <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-1-2.png" alt="" width="46" height="27" />表示该文章分类的id号，因为WordPress本身有一个未分类和链接占用分类的1、2两个id号，我们只能从3开始，图中id为3、4、5、6的几个分类为大分类；而7、8、9、10为3的子分类，其他父子分类关系也如此。子分类可作为网站内页的side里的内容。值得一提的是， <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-1-3.png" alt="" width="56" height="23" />表示文章，“关于公司”、“联系我们”、“合作伙伴”三个文章是直接属于大分类5，这个网站的“关于我们”内页side里既有分类又有文章，如何解决？下边会有介绍。现在整体的大思路应该很明确了就是 大分类+子分类。</p>
<p>2)  让每个大分类内页的side里显示子分类：</p>
<p>如图：</p>
<p><img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-2-1.png" alt="" width="269" height="201" /></p>
<p>这是我们要的效果 ， 因为我们每个大分类下面都要显示各自的子分类 ， 所以在 sidebar.php 里的分类列表只写 &lt;?php wp_list_cats(&#8216;child_of=5&#8242;); ?&gt;  已经不能满足我们的需求。因此需要写一个if判断语句：</p>
<p>这个if语句帮我们解决了在每个大分类下面调用其各自子分类。</p>
<div class="code">
<p>&lt;?php $post = $wp_query-&gt;post;</p>
<p>  if ( in_category(&#8216; 3 &#8216;)|in_category(&#8217;7&#8242;)|in_category(&#8216; 8 &#8216;) |in_category(&#8216; 9 &#8216;)|in_category(&#8216; 10 &#8216;))    &lt;! — 如果文章属于大分类3及其所有子分类7、8、9、10时&#8211;&gt;</p>
<p>    { wp_list_cats(&#8216;child_of= 3 &#8216;);}   &lt;! — 则显示分类3的子分类&#8211;&gt;</p>
<p>  elseif ( in_category(&#8216; 4 &#8216;) |in_category(&#8216; 11 &#8216;)|in_category(&#8216; 12 &#8216;) |in_category(&#8216; 13 &#8216;)|in_category(&#8216; 14 &#8216;)) </p>
<p>    { wp_list_cats(&#8216;child_of= 4 &#8216;);}</p>
<p>  elseif ( in_category( 5 &#8216;)| in_category(&#8217;1 5 &#8216;)|in_category(&#8217;1 6 &#8216;)) </p>
<p>    { wp_list_cats(&#8216;child_of= 5 &#8216;);}</p>
<p>  elseif (  in_category(&#8216; 6 &#8216;)) </p>
<p>    { wp_list_cats(&#8216;child_of= 6 &#8216;);}</p>
<p>?&gt;</p></div>
<p>但上面我们所提到的“关于我们”的side里是“文章+子分类”的列表，所以以上代码也不能完全满足，需要在 { wp_list_cats(&#8216;child_of= 5 &#8216;);} 里加入已发文章的静态链接。如下：</p>
<div class="code">
<p>{ </p>
<p>?&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/company/&#8221; title=&#8221;关于公司&#8221;&gt;关于公司&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/contact/&#8221; title=&#8221;联系我们&#8221;&gt;联系我们&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/partner/&#8221; title=&#8221;合作伙伴&#8221;&gt;合作伙伴&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;?</p>
<p>wp_list_cats(&#8216;child_of= 5 &#8216;);</p>
<p>}</p></div>
<p>现在side里“文章+子分类”的列表，我们很好的解决了。由此启发，当我们在点击各大分类下side列表不一定都用分类，因为如果是分类的话，右边调用的是 category .php， 显示分类页。如果每个大分类下都是这样显示分类列表的话，看起来还是很像blog，不像企业网站。所以我们的网站构架要改一下了，如图： <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-2-2.png" alt="" /></p>
<p>正如图中所示有两种方法实现：一是写一篇该子分类概述的文章，文章里有其他该子分类的链接，把概述文章的链接用刚才所述的方法写在sidebar.php里；另外一种是写一个子分类概述page页面把链接写在sidebar里。这里我们采取第一种方法。因为用page的话会导致页面过多不好管理，而且page的url地址为： http://域名/页面缩略名/ 的结构，这样就不好识别是哪个分类的内容了。改完的代码如下：</p>
<div class="code">
<p>&lt;ul &gt;</p>
<p>      &lt;?php $post = $wp_query-&gt;post;</p>
<p>if (in_category(&#8216; 3 &#8216;)|in_category(&#8217;7&#8242;)|in_category(&#8216; 8 &#8216;) |in_category(&#8216; 9 &#8216;)|in_category(&#8216; 10 &#8216;)) </p>
<p>        {</p>
<p>        ?&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/products/products-all/production/&#8221; title=&#8221;产品概括&#8221;&gt;产品概括&lt;/a&gt;&lt;/li&gt; </p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/products/features/functions-and-features/&#8221; title=&#8221;功能特点&#8221;&gt;功能特点&lt;/a&gt;&lt;/li&gt; </p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/products/strength/strength/&#8221; title=&#8221;核心优势&#8221;&gt;核心优势&lt;/a&gt;&lt;/li&gt; </p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/products/application/report-appdeployment/&#8221; title=&#8221;部署与运用开发&#8221;&gt;部署与运用开发&lt;/a&gt;&lt;/li&gt; </p>
<p>        &lt;?</p>
<p>        }</p>
<p>        elseif (in_category(&#8217;4&#8242;)|in_category(&#8217;1 1 &#8216;)|in_category(&#8217;1 2 &#8216;)|in_category(&#8216; 13 &#8216;)|in_category(&#8216; 14 &#8216;)) </p>
<p>        { wp_list_cats(&#8216;child_of=4&#8242;);}   / * 该分类是“技术中心”，需要它为子分类，就直接调用其子分类 */</p>
<p>        ?&gt;</p>
<p>        elseif ( in_category(&#8217;5&#8242;)|in_category(&#8216; 15 &#8216;)|in_category(&#8217;1 6 &#8216;)) </p>
<p>        { </p>
<p>        ?&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/company/&#8221; title=&#8221;关于公司&#8221;&gt;关于公司&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/contact/&#8221; title=&#8221;联系我们&#8221;&gt;联系我们&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/partner/&#8221; title=&#8221;合作伙伴&#8221;&gt;合作伙伴&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt; /about /news/&#8221; title=&#8221;企业新闻&#8221;&gt;企业新闻&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt; /about /cases/&#8221; title=&#8221;成功案例&#8221;&gt;成功案例&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;?</p>
<p>        }</p>
<p>        elseif ( in_category(&#8217;6&#8242;)) </p>
<p>        { </p>
<p>        ?&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/download/&#8221; title=&#8221;下载试用&#8221;&gt;下载试用&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;li&gt;&lt;a href=&#8221;&lt;?php bloginfo(&#8216;url&#8217;); ?&gt;/about/purchase/&#8221; title=&#8221;购买产品&#8221;&gt;购买产品&lt;/a&gt;&lt;/li&gt;</p>
<p>        &lt;?</p>
<p>        }</p>
<p>&lt;/ul&gt;    </p></div>
<p>至此，sidebar里的子分类（文章）列表已经改完。</p>
<p>接着，需要在子分类上标上该大分类的名称，这一点我仍是采用了if语句将其写死。</p>
<div class="code">
<p>&lt;h3&gt;</p>
<p>&lt;?php</p>
<p> if ( in_category(&#8216; 3 &#8216;)|in_category(&#8217;7&#8242;)|in_category(&#8216; 8 &#8216;) |in_category(&#8216; 9 &#8216;)|in_category(&#8216; 10 &#8216;) ) { ?&gt;产品介绍&lt;?php }</p>
<p>    elseif ( (in_category(&#8217;4&#8242;)|in_category(&#8217;1 1 &#8216;)|in_category(&#8217;1 2 &#8216;)|in_category(&#8216; 13 &#8216;)|in_category(&#8216; 14 &#8216;) ) { ?&gt;技术中心&lt;?php }</p>
<p>    elseif (  in_category(&#8217;5&#8242;)|in_category(&#8216; 15 &#8216;)|in_category(&#8217;1 6 &#8216;) ) { ?&gt;关于我们&lt;?php }</p>
<p>    elseif ( in_category(&#8217;6&#8242;)) { ?&gt;试用购买&lt;?php }</p>
<p>?&gt;</p>
<p>&lt;/h3&gt;</p></div>
<p>  至此，sidebar里的title名称也写完了。sidebar里的子分类（文章）模块内容也全都完成，如若需要可在下面再写点热点链接之类的内容。</p>
<p>  最后，single.php、category.php、 archive.php (企业网站它的用处不大)、index.php等都可以调用该sidebar.php了。</p>
<p>3)  菜单调用大分类</p>
<p>Sidebar做好了，下面就让菜单上显示调用的大分类，调用 &lt;?php wp_list_cats(&#8216;include=3,4,5,6&#8242;); ?&gt; 这句函数即可。include=ID：是我们调用的大类，多个大类的ID号用英文“,”隔开。</p>
<p>4)  修改category.php</p>
<p>现在菜单上列出的是大分类调用，这样每个大分类下面就都会显示分类列表，但如果现在有的大分类不想显示分类列表，而显示该分类的第一篇文章，就需要来修改category.php文件了。思路和修改sidebar差不多。最初 category.php的结构应该如下：</p>
<div class="code">
<p>&lt;?php get_header(); ?&gt;</p>
<p>&lt;?php get_sidebar(); ?&gt;</p>
<p>&lt;div id= ” content ” &gt;</p>
<p>  /*这里是调用分类的内容*/</p>
<p>&lt;/div&gt;</p>
<p>&lt;?php get_footer() ?&gt;</p></div>
<p>现在因为需要点击大分类3、5、6时，页面上展示的是文章而非分类列表，所以在 &lt;div id= ” content ” &gt;&lt;/div&gt;里添加一个if语句：</p>
<p><img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-4-1.png" alt="" /></p>
<p>把以前的 /*这里是调用分类的内容*/   <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-4-2.png" alt="" width="210" height="18" />的 <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-4-3.png" alt="" width="83" height="18" />中。</p>
<p>而需要在结构中添加的是大分类3、5、6中 <img src="/wp-content/uploads/2008/08/wp-enterprise-template-1-4-4.png" alt="" width="74" height="16" />这一块的内容，代码如下</p>
<div class="code">
<p>&lt;?php query_posts(&#8216; name=production &#8216;); ?&gt;</p>
<p>&lt;div class=&#8221;post&#8221; &gt;</p>
<p>  &lt;?php while (have_posts()) : the_post(); ?&gt;</p>
<p>    &lt;h2&gt;&lt;a href=&#8221;&lt;?php the_permalink()   ?&gt;&#8221;   class=&#8221;homesidetext1&#8243; title=&#8221;&lt;?php the_title() ?&gt;&#8221;&gt; &lt;?php the_title() ?&gt; &lt;/a&gt; &lt;/h2&gt;</p>
<p>    &lt;div class=&#8221;entry&#8221;&gt;</p>
<p>      &lt;?php  the_content(&#8216;Read the rest of this entry »&#8217;);  ?&gt;</p>
<p>    &lt;/div&gt;</p>
<p>  &lt;?php endwhile;?&gt;</p>
<p>&lt;/div&gt;  </p></div>
<p>query_posts （）是获取文章，其内参数可用 ’ p=文章ID ’ 或 ’ name=文章缩略名 ’ 来调用想放在大分类下首页的文章；</p>
<p>&lt;h2&gt;&lt;/h2&gt;里是文章名称；</p>
<p>the_content(); 是调用文章内容。</p>
<p>这样就可以在菜单中列出的大分类上点击，出来想要的文章或分类列表了。</p>
<p>以上几点就是企业级网站全站用WordPress搭建的大致思路。</p>
<h4>二．注意事项</h4>
<p>1、  这样的主题模板要基于WordPress的数据库，因为在写side时用到了分类的id号。</p>
<p>2、  正是因为第一条，这样的WordPress主题模板没有通用的，只能因企业而异。</p>
<p>3、  永久链接最好用 /%category%/%postname%/ （分类+文章缩略名）的形式，这样url地址会看起来更有结构性，看起来也更像企业或产品网站。</p>
<p>效果可见：<a href="http://www.bonzerreport.com" target="_blank">www.bonzerreport.com</a>，是不是从中找不到blog的影子了。</p>
<ul class="related_post"><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-03-02 -- <a href="http://marslau.com/archives/16.html" title="WordPress 主题简明教程">WordPress 主题简明教程</a> (3)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/86.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e4%bc%81%e4%b8%9a" rel="tag">企业</a>, <a href="http://marslau.com/archives/tag/%e4%bc%81%e4%b8%9a%e7%bd%91%e7%ab%99" rel="tag">企业网站</a>, <a href="http://marslau.com/archives/tag/%e6%a8%a1%e6%9d%bf" rel="tag">模板</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/86.html/feed</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>WordPress 主题简明教程</title>
		<link>http://marslau.com/archives/16.html</link>
		<comments>http://marslau.com/archives/16.html#comments</comments>
		<pubDate>Sun, 02 Mar 2008 02:54:40 +0000</pubDate>
		<dc:creator>Mars Lau</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[教程]]></category>

		<guid isPermaLink="false">http://127.0.0.1/wordpress/index.php/archives/16</guid>
		<description><![CDATA[简介 每一套 WP 主题都由结构层、表现层和数据层构成，可以说是典型的、符合 Web 体系标准的“三层结构”。WP 主题的这种模式块化的特点决定了其设计其实是非常简单，但又极其灵活的。可... ]]></description>
			<content:encoded><![CDATA[<h3 class="post-subtitle">简介</h3>
<p>每一套 WP 主题都由结构层、表现层和数据层构成，可以说是典型的、符合 Web 体系标准的“三层结构”。WP 主题的这种模式块化的特点决定了其设计其实是非常简单，但又极其灵活的。可以说，学会了制作 WP 主题，就相当于基本理解了 Web 开发的客户端模型，对进一步学习掌握 Web 技术具有重要意义。这也正是 WP 的魅力所在！</p>
<p>在一套 WP 主题中，最基本的两个文件是 index.php 和 style.css。其中，前者定义结构和内容，后者定义样式。所谓结构，就是由指由 XHTML 标签构成的网页基本架构。在 WP 主题中，结构层主要使用的是添加了适当的 id 或（和）class 属性的 div 和 ul 元素，以便更好地通过表现层来控制页面的布局和外观。所谓表现层，其实就是网页的布局和样式－－也就是外观。表现层由 CSS（层叠样式表）规则定义构成。而数据层，顾名思义，也就是网站中实际显示的内容，是通过调用 WP 内置的函数（有时需要传递适当的参数）从数据库中取得的。</p>
<blockquote><p>说明：为简明起见，本教程不涉及如何定义样式表（CSS）文件的内容。</p></blockquote>
<p>事实上，当我们打开某个主题的文件夹时，看到的并不止这两个文件，而是更多。但一般来说，在一个完整的 WP 主题文件夹中都应该包含下列文件（也称为模板文件）：</p>
<p class="code">
<table border="0">
<tbody>
<tr>
<td>页面</td>
<td>模板文件</td>
<td>用途</td>
</tr>
<tr>
<td>首页</td>
<td>index.php</td>
<td>显示网站首页</td>
</tr>
<tr>
<td>单页</td>
<td>single.php</td>
<td>显示博文的页面（相当于细节页）</td>
</tr>
<tr>
<td>静态页</td>
<td>page.php</td>
<td>显示静态页的页面（包含各级静态页面）</td>
</tr>
<tr>
<td>分类页</td>
<td>category.php</td>
<td>显示分类页的页面（相当于栏目页）</td>
</tr>
<tr>
<td>存档页</td>
<td>archive.php</td>
<td>显示存档页的页面（相当于按时间归类的栏目页）</td>
</tr>
<tr>
<td>搜索页</td>
<td>search.php</td>
<td>显示搜索结果的页面</td>
</tr>
<tr>
<td>评论页</td>
<td>comments.php</td>
<td>显示评论的页面</td>
</tr>
<tr>
<td>弹出式评论页</td>
<td>comments-popup.php</td>
<td>显示弹出式评论的页面</td>
</tr>
<tr>
<td>404错误页</td>
<td>404.php</td>
<td>显示 404 错误信息的页面</td>
</tr>
<tr>
<td>层叠样式表</td>
<td>style.css</td>
<td>控制页面布局外观</td>
</tr>
</tbody>
</table>
<p>除此之外，一套主题模板中还可以包含 author.php、home.php、date.php、searchform.php 以及 functions.php 等页面（其中部分页面稍后介绍）。</p>
<p>虽然上面列出了与 WP 内置功能对应的 9 个 php 文件，但制作一套主题远没有想像得那么复杂。因为事实上，你只需要制作一个 index.php 文件，就可以派生出另外 8 个文件来！</p>
<p>从 WP 应用主题的机制来说，这 9 个模板文件是存在优先级差别的，也可以认为是重要性不同。它们的优先级顺序是：</p>
<p>index.php -&gt; single.php -&gt; page.php -&gt; archive.php -&gt; search.php -&gt; 404.php。</p>
<p>这样，当不存在后边的页面时，WP 会自动调用前面的页面，直至调用 index.php。比如，当程序调用页面页 page.php 时，如果 page.php 模板文件不存在，那么程序会尝试调用前面的文件－－single.php。而如果 single.php 也不存在，那么就会调用最终的 index.php 来显示页面页。可见 index.php 属于“垫底儿”的缺省页面，它的重要性是最高的。但当存在具体页面时，还是要优先使用具体的页面，可见具体的页面优先级最高。</p>
<p>在明确了 index.php 是一套 WP 主题的核心之后，我们就可以将制作 WP 主题的过程简单地分成两步，即－－定义主模板文件 index.php 和派生其他模板文件。</p>
<h3 class="post-head">定义主模板文件 index.php</h3>
<p>从页面布局的角度上，有必要将主模板文件 index.php 拆分成 header.php、sidebar.php 和 footer.php 三个子页面。WP 专门为在 index.php 中包含这三个子页面提供了对应的 get_header()、get_sidebar() 和 get_footer() 函数。</p>
<p>下面，就来详细介绍一下制作 index.php 页面的过程：<br />
首先，在 myThemes 文件夹中建立一个文本文件并将其重命名为 index.php，然后再建立一个 style.css 文件（内容暂时留空）。<br />
然后，用你喜欢的文本编辑器打开 index.php 并输入下列代码（最好复制，因为这一部分不重要）：</p>
<p class="code">&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>“&gt;<br />
&lt;html xmlns=”<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>“&gt;<br />
&lt;head profile=”<a href="http://gmpg.org/xfn/11">http://gmpg.org/xfn/11</a>“&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>
<p>显然，这是一些构成网页文件的 HTML 代码，当然其中包含 PHP 代码。如前所述，HTML 代码定义结构，而 PHP 代码用于生成内容。</p>
<p>在 WP 后台的“主题”模块中，选择 myTheme 主题。然后，在浏览器中观察你的 WP 外观。此时，应该显示页面一片空白。但通过“查看源文件”，你会发现 index.php 中的 PHP 代码已经生成了一些头部内容。</p>
<p>接着，我们开始动手定义 index.php 中 body 部分的结构和内容。</p>
<h3 class="post-subtitle">（一）构建 header</h3>
<p>在 body 元素内，新建如下结构化标记元素，注意各元素都带有不同的 id 属性：</p>
<p class="code">&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>
<p>然后，在该 &lt;div id=”header”&gt;&lt;/div&gt; 元素的两个标签之间输入下列代码：</p>
<p class="code">&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>
<p>这里用到了 WP 内置的 bloginfo 函数来生成内容，其中：</p>
<ul>
<li>bloginfo(’url’)返回网站主页链接；</li>
<li>bloginfo(’name’)返回网站标题；</li>
<li>bloginfo(’description’)返回网站描述。</li>
</ul>
<p>保存 index.php 文件，然后在浏览器中按 F5 刷新一下页面，看能看到什么？再通过“查看源文件”，核对一下由 WP 的 bloginfo() 函数生成的相关信息。</p>
<h3 class="post-subtitle">（二）构建 content</h3>
<p>在 &lt;div id=”content”&gt;&lt;/div&gt; 中，我们要通过循环显示博文，包括每个博文的标题、作者、发表日期以及其他相关信息。并且，可以分页显示博文（取决于 WP 后台的设置）。<br />
首先，在 &lt;div id=”content”&gt; 与 &lt;/div&gt; 之间输入下列代码：</p>
<p class="code">&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&#8217;) ?&gt;&lt;/span&gt;<br />
&lt;span class=”post-day”&gt;&lt;?php the_time(’d&#8217;) ?&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;?php previous_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>
<p>看似复杂，其实不然。首先：</p>
<p class="code">&lt;?php if (have_posts()) : ?&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;?php endif; ?&gt;</p>
<p>这三行，在 WP 中表示 if 控制结构。注意，if 语句通过测试 have_posts() 函数来判断是否存在博文。而</p>
<p class="code">&lt;?php while (have_posts()) : the_post(); ?&gt;<br />
&lt;?php endwhile; ?&gt;</p>
<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>
<ul>
<li>the_ID()：返回博文 ID；</li>
<li>the_permalink()：返回博文固定链接 URL；</li>
<li>the_title()：返回博文标题；</li>
<li>the_time(’M&#8217;)：返回发表日期中的月份；</li>
<li>the_time(’d&#8217;)：返回发表日期中的天；</li>
<li>the_author()：返回博文作者；</li>
<li>the_category()：返回博文的类别；</li>
<li>the_content()：返回博文的内容，其中的参数表示用于“更多内容”的链接文本；</li>
</ul>
<p>以上函数都是以 the_ 开头的，加上后面的函数名不仅颇有自解释的味道，而且令人联想到 this 关键字。此外_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>
<p class="code">&lt;div class=”post”&gt;<br />
&lt;h2&gt;&lt;?php _e(’Not Found’); ?&gt;&lt;/h2&gt;<br />
&lt;/div&gt;</p>
<p>显然，这是一个错误提示信息。</p>
<h3 class="post-subtitle">（三）构建 sidebar</h3>
<p>sidebar 的内容当然要在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 元素中构建了。sidebar，中文叫侧边栏，其中可以包含很多内容。比如：分类、页面、链接、日历等等导航及相关信息。<br />
在 WP 中，sidebar 中的内容都以无序（ul）或有序（ol）列表的形式输出。因此，需要在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 中输入以下标记：</p>
<p class="code">&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;&lt;/ul&gt;</p>
<p>以上代码从第三行开始，分别通过包含 searchform.php 显示搜索表单；</p>
<li>调用 get_calendar() 函数显示日历；</li>
<li>调用 wp_list_pages() 函数显示页面导航；</li>
<li>调用 wp_list_cats() 函数显示分类导航；</li>
<li>调用 wp_get_archives() 函数显示存档导航；</li>
<li>调用 get_links() 函数显示链接导航。</li>
<p>在构建侧边栏时，要为生成搜索框新建一个 searchform.php 文件，其内容如下：</p>
<p class="code">&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>
<p>将其保存在 myTheme 文件夹中，通过 include 语句包含进来就可以了。注意，常量 TEMPLATEPATH 中保存的是模板路径。<br />
最后，说明一下以上代码第二行和倒数第二行。显然这是一个 if 语句块。那这个 if 语句块包含 sidebar 是何用意呢？这是部件化侧边栏的需要，就是让 sidebar 适合 Widget 插件（WP 2.0 后内置了 Widget，所以不用再安装了）。如果要使用 Widget 插件，必须对 sidebar 进行部件化。这样，在 WP 后台通过 Widget 插件你就可以使用拖动来方便地定义侧边栏的组件了。部件化侧边栏，除了在 ul 元素内侧放入这个 if 语句之外，还必须在 myTheme 文件夹中建立一个文件 functions.php，其内容如下：</p>
<p class="code">&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>
<h3 class="post-subtitle">（四）构建 footer</h3>
<p>footer 中一般都一些版权信息和不太重要的链接。所以可以在 &lt;div id=”footer”&gt;&lt;/div&gt; 元素中简单地放入下列代码：</p>
<p class="code">&lt;p&gt;Copyright © 2007 &lt;?php bloginfo(’name’); ?&gt;&lt;/p&gt;</p>
<p>至此，核心 index.php 文件就算是大功告成了！</p>
<p>接下来，是拆分 index.php 和基于 index.php 派生子模板文件。</p>
<p>在 myTheme 文件夹中新建 header.php、sidebar.php 和 footer.php 三个文件。把 index.php 中的 &lt;div id=”header”&gt;&lt;/div&gt;、&lt;div id=”sidebar”&gt;&lt;/div&gt; 和 &lt;div id=”footer”&gt;&lt;/div&gt; 三个结构化元素及其内容分别转移（剪切）到这三个新文件中。然后，在 &lt;div id=”header”&gt;&lt;/div&gt; 原来的位置处输入代码：</p>
<p class="code">&lt;?php get_header();?&gt;</p>
<p>在 &lt;div id=”sidebar”&gt;&lt;/div&gt; 原来的位置处输入代码：</p>
<p class="code">&lt;?php get_sidebar();?&gt;</p>
<p>在 &lt;div id=”footer”&gt;&lt;/div&gt; 原来的位置处输入代码：</p>
<p class="code">&lt;?php get_footer();?&gt;</p>
<p>前面说过，这三个 get 函数是 WP 专门为包含结构化的文件定义的。现在你的 index.php 文件应该如下所示：</p>
<p class="code">&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>“&gt;<br />
&lt;html xmlns=”<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>“&gt;&lt;head profile=”<a href="http://gmpg.org/xfn/11">http://gmpg.org/xfn/11</a>“&gt;<br />
&lt;meta http-equiv=”Content-Type” content=”&lt;?php bloginfo(’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;?php wp_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;?php bloginfo(’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;?php bloginfo(’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&#8217;) ?&gt;&lt;/span&gt;<br />
&lt;span class=”post-day”&gt;&lt;?php the_time(’d&#8217;) ?&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;?php previous_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>
<p>然后，是派生子模板文件。把这个“模块化”的 index.php 文件另存为 single.php、page.php、archive.php、 search.php 和 category.php。当然，都保存在 myTheme 文件夹中。这样，WP 在显示页面时就会调用相应的页面文件了。比如，显示博文详细内容时，会调用 single.php；而显示页面内容时，则调用 page.php。<br />
最后，要做的工作就是自定义这些子模板文件。</p>
<p><strong>PS：</strong>1.文章转载于“<a href="http://www.cn-cuckoo.com/" target="_blank">为之漫笔</a>”。</p>
<p>          2.如果您是刚接触wordpress主题，想更系统学习它，我推荐您一个由“我爱水煮鱼”翻译的主题教程   <img src="http://127.0.0.1/wordpress/wp-content/uploads/2008/03/download1.gif" alt="download1.gif" />（<a title="主题教程下载" href="http://www.box.net/shared/ba1l6vpuv0" target="_blank">下载</a>）</p>
<ul class="related_post"><li>2009-07-22 -- <a href="http://marslau.com/archives/454.html" title="WordPress主题5styles">WordPress主题5styles</a> (56)</li><li>2009-07-19 -- <a href="http://marslau.com/archives/443.html" title="wordpress主题切换预览插件：Theme Switcher Reloaded">wordpress主题切换预览插件：Theme Switcher Reloaded</a> (5)</li><li>2009-06-30 -- <a href="http://marslau.com/archives/428.html" title="WordPress安装简明步骤">WordPress安装简明步骤</a> (9)</li><li>2009-05-17 -- <a href="http://marslau.com/archives/397.html" title="WordPress主题amarketer发布">WordPress主题amarketer发布</a> (86)</li><li>2009-03-12 -- <a href="http://marslau.com/archives/330.html" title="WordPress主题RBcss发布">WordPress主题RBcss发布</a> (79)</li><li>2008-11-28 -- <a href="http://marslau.com/archives/224.html" title="wordpress主题结构层次图">wordpress主题结构层次图</a> (15)</li><li>2008-10-20 -- <a href="http://marslau.com/archives/137.html" title="给Blog换新主题">给Blog换新主题</a> (15)</li><li>2008-08-25 -- <a href="http://marslau.com/archives/86.html" title="WordPress搭建企业网站 ">WordPress搭建企业网站 </a> (44)</li><li>2011-12-31 -- <a href="http://marslau.com/archives/818.html" title="wordpress自定义栏目（Custom Fields）的应用">wordpress自定义栏目（Custom Fields）的应用</a> (0)</li><li>2009-03-19 -- <a href="http://marslau.com/archives/361.html" title="wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充">wordpress插件推荐：WP-EasyArchives 以及月存档链接问题补充</a> (10)</li></ul><hr />
<p><small>摘自：<a href="http://marslau.com">MarsLau&#039;s Blog</a> |
原文链接：<a href="http://marslau.com/archives/16.html">Permalink</a> |
<br/>
Tags: <a href="http://marslau.com/archives/tag/wordpress" rel="tag">wordpress</a>, <a href="http://marslau.com/archives/tag/%e4%b8%bb%e9%a2%98" rel="tag">主题</a>, <a href="http://marslau.com/archives/tag/%e6%95%99%e7%a8%8b" rel="tag">教程</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://marslau.com/archives/16.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

