The Loop结构如下:
Query post or page
Start Loop //循环开始
the_title (outputs the title of the post) //标题
the_excerpt (outputs the post excerpt) //摘要
the_content (outputs the full post content) //内容
the_category (outputs the post categories) //目录
the_author (outputs the post author) //作者
the_date (outputs the post date) //日期
other tags (there is a variety of other tags you can use in the loop) //标签
endwhile; //结束循环
Exit the loop //退出循环
WordPress的后台文件
为了让主题工作,WordPress还需要一些必要的后台文件。这些文件可以根据个人需求进行修改,它们能够从极大程度上改变网站的外观或提供更强大的功能。
comments.php
这个文件控制评论的输出,如果您希望在博客上提供评论功能,要把它放到loop中去。Comment.php文件可以被插件覆盖(如Disqus)
functions.php
Functions.php让我们在WordPress上运行自定义代码,以便更自由的修改主题元素。
style.css
这是控制主题样式的主要CSS文件。该文件顶部还包含主题的元信息,用于提供主题的名字,作者及相关链接
图文剖析
下面是强大的WordPress剖析图









