php - 创建 child 主题。 "Warning: file_get_contents9():failed to open stream: No such file or directory"错误

标签 php css wordpress

我正在尝试从我当前的主题 (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/

相关文章:

c# - 世界货币查找表 - 带有 ISO 3166-1 alpha-2 代码?

php - 观察者不保存订单

html - 在水平显示中添加菜单项

javascript - Google Maps API 点击事件监听器被执行多次

php - 从 mysql 的表中选择随机 AND 'published' 行

css - 使页脚贴在页面底部

php - 警告消息来自Where函数Mysql php的非法偏移类型

php - 在其他表的帮助下选择 mySQL 数据

css - 悬停 div 时如何影响 UPPER 元素?

javascript - 如何将一个 div 覆盖在另一个之上?