标签:
通常一个wp的theme必须的文件有:
404.php | archive.php |
attachment.php | author.php |
footer.php | category.php |
functions.php | comments.php |
header.php | page.php |
index.php | search.php |
single.php | sidebar.php |
style.css | tag.php |
这里不再对每个文件功能进行说明 ,相信都是一目了然的。
接下来我们开始编辑style.css , 开头通常都会有一些版权标识:
/* Theme Name: Mini Theme Theme URI: http://example.com/example/ Description: A search engine optimized website framework for WordPress. Author: Your name Author URI: http://example.com/ Version: 1.0 Tags: Comma-separated tags that describe your theme.
...
*/
完成一个首页,我们需要涉及到3个文件:header.php / index.php / footer.php ,在index.php中调用 header.php和footer.php ,需要使用:
1 <?php get_header(); ?> // 导入头部
2 // index.php 中间部分
3 <?php get_footer(); ?> // 导入尾部
标签:
原文地址:http://www.cnblogs.com/simpleiseverything/p/4465588.html