<?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>Graygift@ye &#187; php</title>
	<atom:link href="http://www.graygift.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.graygift.com</link>
	<description>我是孤独的根号5      </description>
	<lastBuildDate>Sun, 08 Nov 2009 02:13:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WordPress主题模板修改基本知识</title>
		<link>http://www.graygift.com/wordpress/wordpress-template-modified-basic-knowledge-of-the-subject/</link>
		<comments>http://www.graygift.com/wordpress/wordpress-template-modified-basic-knowledge-of-the-subject/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 07:56:00 +0000</pubDate>
		<dc:creator>Graygift</dc:creator>
				<category><![CDATA[knowledge]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.graygift.com/?p=946</guid>
		<description><![CDATA[我也修改了很多的主题，对主题中所写的一些数据库查询语句也有了一些认识！找出来给那些要修改主题的人！ WordPress基本模板文件 style.css : CSS(样式表)文件 index.php : 主页模板 archive.php : Archiv... ]]></description>
			<content:encoded><![CDATA[<p>我也修改了很多的主题，对主题中所写的一些数据库查询语句也有了一些认识！找出来给那些要修改主题的人！</p>
<p>WordPress基本模板文件 </p>
<p>style.css : CSS(样式表)文件    <br />index.php : 主页模板     <br />archive.php : Archive/Category模板     <br />404.php : 404页面，错误页模板     <br />comments.php : 留言/回复模板     <br />footer.php : Footer模板     <br />header.php : Header模板     <br />sidebar.php : 侧栏模板     <br />page.php : 内容页(Page)模板     <br />single.php : 内容页(Post)模板     <br />searchform.php : 搜索表单模板     <br />search.php : 搜索结果模板 </p>
</p>
<p> <span id="more-946"></span>
<p>基本条件判断Tag </p>
<p>is_home() : 是否为主页    <br />is_single() : 是否为内容页(Post)     <br />is_page() : 是否为内容页(Page)     <br />is_category() : 是否为Category/Archive页     <br />is_tag() : 是否为Tag存档页     <br />is_date() : 是否为指定日期存档页     <br />is_year() : 是否为指定年份存档页     <br />is_month() : 是否为指定月份存档页     <br />is_day() : 是否为指定日存档页     <br />is_time() : 是否为指定时间存档页     <br />is_archive() : 是否为存档页     <br />is_search() : 是否为搜索结果页     <br />is_404() : 是否为 “HTTP 404: Not Found” 错误页     <br />is_paged() : 主页/Category/Archive页是否以多页显示 </p>
<p>Header部分常用到的PHP函数 </p>
<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>
<p>模板常用的PHP函数及命令 </p>
<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>
<p>与模板相关的其他函数 </p>
<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>
<ul class="related_post"><li><a href="http://www.graygift.com/wordpress/wordpress-theme-related-articles-code/" title="wordpress主题&ndash;相关文章代码">wordpress主题&ndash;相关文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-random-article-code/" title="wordpress主题&ndash;随机文章代码">wordpress主题&ndash;随机文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-the-latest-article-code/" title="wordpress主题&ndash;最新文章代码">wordpress主题&ndash;最新文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-the-hottest-article-code/" title="wordpress主题&ndash;最热文章代码">wordpress主题&ndash;最热文章代码</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-the-latest-comments-code/" title="wordpress主题&#8211;最新评论代码">wordpress主题&#8211;最新评论代码</a></li><li><a href="http://www.graygift.com/wordpress/comment-page-to-add-and-delete-spam-links/" title="评论页添加删除和垃圾评论链接">评论页添加删除和垃圾评论链接</a></li><li><a href="http://www.graygift.com/wordpress/detailed-comment-php-production-template/" title="Comment.php模板的制作详解">Comment.php模板的制作详解</a></li><li><a href="http://www.graygift.com/wordpress/wordpress-theme-navigation-bar-of-the-drop-down-list/" title="wordpress 主题之下拉列表导航栏">wordpress 主题之下拉列表导航栏</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.graygift.com/wordpress/wordpress-template-modified-basic-knowledge-of-the-subject/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

