修复WordPress的Uncaught Error: Class “Elementor\Scheme_Typography” not found报错

修复WordPress的Uncaught Error: Class "Elementor\Scheme_Typography" not found报错

测试WordPress主题Grade,用的WordPress版本6.1.1,Elementor版本6.8.1,打开前台直接报错:

Fatal error: Uncaught Error: Class "Elementor\Scheme_Typography" not found

经过一番冲浪得知:如果您使用 Elementor Page Builder 和其他Elementor扩展组件,您可能会碰到这个致命错误。

修复方法十分简单:

1.在 wp-content/plugins 文件夹中创建一个新的php 文件,例如fix-scheme-color.php

2.将下面的代码段添加到您刚刚创建的文件中,保存后前往Wordpress后台的插件页面。启用插件 Elementor Scheme_Color 和 Scheme_Typography 类不存在问题修复 即可。

<?php
/**
* Plugin Name: Scheme_Typography_fix_by_Themege.net
**/
namespace Elementor;
add_action(
  'plugins_loaded',
  function() {
    if ( ! class_exists( 'Elementor\Scheme_Color' ) ) {
      class Scheme_Color extends Core\Schemes\Color {}
    }
  }
);
add_action(
  'plugins_loaded',
  function() {
    if ( ! class_exists( 'Elementor\Scheme_Typography' ) ) {
      class Scheme_Typography extends Core\Schemes\Typography {}
    }
  }
);

 

阅读全文
常见问题
下载地址失效了怎么版?
客服会第一时间检查下载地址,并发送到您的注册邮箱。如未及时处理可联系客服QQ或邮箱。
导入演示被中断了想重新导入怎么办?
https://themege.net/23822.html
不懂导入演示数据?无法一键导入演示数据?
https://themege.net/16186.html
原文链接:https://themege.net/33181.html,转载请注明出处。
0

评论0

请先