研发一个简单的WordPress主题
<div style="color: black; text-align: left; margin-bottom: 10px;">
<h1 style="color: black; text-align: left; margin-bottom: 10px;">引言</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">此教程为<a style="color: black;">WordPress<span style="color: black;">研发</span>app(小程序)接口<span style="color: black;">研发</span>教程</a>系列教程。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">非常多</span>人认为制作一个WP主题很麻烦,但<span style="color: black;">并不</span>然,只需要几分钟你就<span style="color: black;">能够</span>制作出一个属于自己的WP主题,<span style="color: black;">由于</span>一个WP主题它其实只需要<span style="color: black;">包括</span>几个文件就足够了。</p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">教程<span style="color: black;">起始</span></h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1、创建一个文件夹,名字自定义,此处我的文件夹名<span style="color: black;">叫作</span>为wpApp(<span style="color: black;">运用</span>编辑器为sublime)</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f10cd538f4934a4fb04f8f8008b63e1e~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728385204&x-signature=E6IT9UY5GxcXb8s3N0eDR%2FQ8vZ4%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2、在该文件夹下面新建文件style.css</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/8f7f92bb76b84de5801c0d9631e6477e~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728385204&x-signature=hyn3O4fTY95Ld83H3PczhK5BW1Y%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3、在style.ss中写入以下代码:</p>/*
Theme Name: wpApp(主题名<span style="color: black;">叫作</span>)
Theme URI: 主题<span style="color: black;">位置</span>
Author: sliverRing(主题作者)
Author URI: https://www.inacorner.top(作者博客)
Description: 一个wpapp主题(主题描述)
Version: 1.0.0(主题版本)
*/<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如图:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/c0d7d95fec4c46bf84e6d7a0894c7d26~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728385204&x-signature=YwOkwyPt0cDrZXVlgBE5fyAAkfo%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4、在该文件夹下面创建index.php文件,并写入以下代码:</p><?php
get_header(); //wp函数,引入头部
echo 世界,你好!;
get_footer();//wp函数引入底部
?>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如图:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/5de0a198336d4ae3a97671442c3de063~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728385204&x-signature=%2B2wQ5qH9XrFaQ2X3RM8bGdAUIy8%3D" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">5、打包主题,上传至WP程序的主题根目录,之后在WP管理后台你就<span style="color: black;">能够</span>看到自己的主题了,<span style="color: black;">而后</span>点击启用,<span style="color: black;">拜访</span>域名你将得到以下界面:</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f6dd71075e7f45f5aada04ddf9fc0dd5~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728385204&x-signature=SJs8ANvQUf6U6kvoVehaSUyU4UM%3D" style="width: 50%; margin-bottom: 20px;"></div>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">结束</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">好了,至此一个简易的WP主题就<span style="color: black;">研发</span>完<span style="color: black;">成为了</span>,后期将<span style="color: black;">运用</span>此主题进行App<span style="color: black;">研发</span>。</p>
</div>
论坛外链网http://www.fok120.com/
页:
[1]