在学习三里分析了自带的一个例子,本节我们就自己仿照他做个简单的吧,重点是调用wordpress封装好的函数和类,css和html可以稍好在调整。
将wp带的例子复制一份处理,重新名个名字。
清空index.php和style.css的文件内容。修改style.css的头部如下:
/*Theme Name: simplicityTheme URI: https://mxyb.net/Author: ljwAuthor URI: https://mxyb.net/Description: testVersion: 1.5License: GNU General Public License v2 or laterLicense URI: http://www.gnu.org/licenses/gpl-2.0.htmlTags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, fluid-layout, responsive-layout, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-readyText Domain: twentythirteenThis theme, like WordPress, is licensed under the GPL.Use it to make something cool, have fun, and share what you've learned with others.*/
<?php wp_title(); ?>
上面是index.php的代码,这样一个没有样式的纯简单的主题就好了
如果我们对css和html很熟悉的话,就可以从头开始进行版面的设计了。这方面我不太在行呀。