wordpress技术文档

如何创建一个hello elementor的wordpress子主题

日期:2022-01-08 阅读:443

https://elementor.com/blog/wordpress-child-theme/ 

wordpress企业快站的主题,采用hello elementor的子主题。

可以这样创建:

一开始只要两个文件即可,分别是style.css 和 functions.php

style.css
First, create a file named style.css and add the following code:

/*

Theme Name: Hello Elementor Child

Theme URI: https://github.com/elementor/hello-theme/

Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team

Author: Elementor Team

Author URI: https://elementor.com/

Template: hello-elementor

Version: 1.0.1

Text Domain: hello-elementor-child

License: GNU General Public License v3 or later.

License URI: https://www.gnu.org/licenses/gpl-3.0.html

*/

 

----

其中 Template: hello-elementor 这行最重要,告诉父主题是哪个。

functions.php
这个文件可以没有内容,但必须要有这个文件。

-------------

具体请看视频教程。