代码之家  ›  专栏  ›  技术社区  ›  ultraloveninja

WordPress中注册主题目录的怪异主题迭代

  •  0
  • ultraloveninja  · 技术社区  · 7 年前

    克隆git repo时,它会将其放入一个子目录中,这很好。

    到目前为止,我可以访问父和子主题正确使用 register_theme_directory wp-config.php 像这样归档:

    register_theme_directory(dirname(__FILE__) . '/wp-content/themes/repodir/parentTheme');
    

    enter image description here

    回购的当前目录结构如下:

    +--------------------------------------+
    |                                      |
    | +-+wp-content                        |
    |   |                                  |
    |   +-+themes                          |
    |     |                                |
    |     +-+repodir                       |
    |       |                              |
    |       +-+parentTheme                 |
    |       | |                            |
    |       | +-+library                   |
    |       | |                            |
    |       | +-+styles                    |
    |       | |                            |
    |       | +-+scripts                   |
    |       | |                            |
    |       | +-+images                    |
    |       | |                            |
    |       | +-+modules                   |
    |       |                              |
    |       +-+childTheme                  |
    |                                      |
    |                                      |
    |                                      |
    +--------------------------------------+
    

    The theme directory "scripts/.." does not exist.

    The theme directory "styles/.." does not exist.

    这让我相信它在我的父主题中的子目录上作为可能的WordPress主题目录?

    我想我不知道如何得到它,使它只显示两个家长和孩子的主题?总的来说,我可以激活儿童主题和一切 出现

    这是我在父主题中的信息 style.css 因为主题的主要风格是 styles 文件夹:

    /*
    Theme Name: Theme Parent
    Theme URI: http://www.urldomains.com
    Description:  Theme Modules
    Author: Me
    Author URI: http://www.urldomains.com
    Version: 1.0
    */
    

    0 回复  |  直到 7 年前