我使用Avada主题,并为其创建了一个子主题(Customweb)。
我试图覆盖该文件:
wp-content/themes/Avada/includes/lib/inc/templates/featured-image-first.php
wp-content/themes/Customweb/includes/lib/inc/templates/featured-image-first.php
谢谢你的帮助。
我使用Avada主题,并为其创建了一个子主题(Customweb)。
我试图覆盖该文件:
wp-content/themes/Avada/includes/lib/inc/templates/featured-image-first.php
wp-content/themes/Customweb/includes/lib/inc/templates/featured-image-first.php
谢谢你的帮助。
子主题允许您覆盖通过WordPress的模板加载机制加载的模板,例如。get_template_part
或主主题模板,如index.php
和single.php
.
But they can\'t be used to replace arbitrary PHP files or assets.
如果主题使用加载模板文件require
或include
, WordPress无法拦截此内容并将其替换为子主题版本。
如果是这种情况,那么您需要找到一种替代方法来实现您的目标。查看主题文档,作者可能已经提供了一种方法,例如选项或过滤器,或者您可能需要分叉主题。
所以,我有一个子主题,里面除了所需的CSS文件之外什么都没有。一旦我激活了这个儿童主题,我的整个网站就关闭了。最后我有两个问题:激活一个只有CSS的子主题怎么能破坏我的网站</我怎样才能回到我原来的主题</这些是网站给我的错误:Warning: require_once(/wp-content/themes/interio_child/admin/options-framework.php) [function.require-once]: 无法打开流:中没有此类文件或目录/wp-c