我正在尝试从我当前的主题 (Tesseract 2) 创建一个子主题。我已按照指定的说明进行操作 here但是我不断收到错误消息:
Warning: file_get_contents(/home/fletcher/public_html/wp-content/themes/tesseract-child/css/typicons.css):
failed to open stream: No such file or directory in
/home/fletcher/public_html/wp-content/themes/TESSERACT/inc/beaver-builder-modules/link-button/link-button-module.php on line 44.
我可以通过禁用插件(Beaver Builder 插件(精简版))来消除这个错误,但是当我在我的网站上使用这个插件时,这并不是一个真正可行的选择。
child 的 style.css
文件:
/*
Theme Name: Tesseract-child
Description: Tesseract Child Theme
Author:
Template: TESSERACT
*/
child 的 functions.php
文件:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style',get_template_directory_uri().'/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array('parent-style')
);
}
如有任何帮助,我们将不胜感激。
最佳答案
找出导致此错误的原因,现在已修复。
问题出在我的主机使用的 PHP 版本 (5.3) 上。将 PHP 版本切换到 5.6 解决了这个问题。
关于php - 创建 child 主题。 "Warning: file_get_contents9():failed to open stream: No such file or directory"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33972114/