简体   繁体   English

Wordpress:多个儿童主题

[英]Wordpress: multiple child themes

I have a premium theme on my Wordpress website, and already have set a child theme, which is inheriting files from the parent theme. 我的Wordpress网站上有一个高级主题,并且已经设置了一个子主题,它继承了父主题中的文件。

Now I would like to enable another child theme to be completely independent of the main theme, but using the same Wordpress database. 现在我想让另一个子主题完全独立于主题,但使用相同的Wordpress数据库。

Is that possible? 那可能吗?

Bruno, you can't have multiple themes active at the same time. 布鲁诺,你不能同时激活多个主题。

You can create a separate child theme using the same parent theme. 您可以使用相同的父主题创建单独的子主题。 You can only have one active at a time though. 你一次只能有一个活跃的。 Here is how you do that. 是你如何做到这一点。

Also, I'm not sure what you mean by 另外,我不确定你的意思

another child theme to be completely independent of the main theme 另一个儿童主题完全独立于主题

If it's independent of a parent them, then it's not a child theme. 如果它独立于父母,那么它不是儿童主题。 and when you say 当你说的时候

but using the same Wordpress database 但使用相同的Wordpress数据库

I'm also not sure what you mean. 我也不确定你的意思。 You can easily change Wordpress themes on a single Wordpress installation. 您可以在单个Wordpress安装上轻松更改Wordpress主题。

Hope that helps. 希望有所帮助。

If its still relevant for anyone, ABSOLUTELY - you can. 如果它仍然适合任何人,绝对 - 你可以。 Thats a great way to remove a clutter of multiple themes and headaches associated with multiple code styles. 这是一个很好的方法来消除与多个代码样式相关的多个主题和头痛的混乱。 Just add a new functions.php in each child and a new style.css ... then in my research I was able to also recreate folder hierarchy for page templates. 只需在每个子项中添加一个新的functions.php和一个新的style.css ...然后在我的研究中我还能够为页面模板重新创建文件夹层次结构。

Now in the past - owing to my limited knowledge Ive still changed a couple files in the mother theme because I could not drag that privilege over to the child folder. 现在在过去 - 由于我的知识有限,我仍然在母主题中更改了几个文件,因为我无法将该权限拖到子文件夹中。

So that could become a limitation. 这可能成为一种限制。

I also learnt that if the theme operates fancy with options - you dont even need children. 我还了解到,如果主题与选项有关 - 你甚至不需要孩子。 You can have the different options going on different sub domains and theyll be saved in respective tables. 您可以在不同的子域上使用不同的选项,并将它们保存在各自的表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM