wordpress出现 wordpress出现以下错误: Notice: Trying to get property 'queue' of non-object on line 2781

wordpress出现以下错误:

Notice: Trying to get property 'queue' of non-object inE:\phpstudy_pro\WWW\wp-includes\script-loader.php on line 2781

Warning: Invalid argument supplied for foreach() in E:\phpstudy_pro\WWW\wp-includes\script-loader.php on line 2781

$wp_styles没有设置全局,因为您正在删除初始化它的代码。

解决办法:

function.php添加以下代码

add_action( 'wp_head', 'wp_styles', 1 );

 来源:https://wordpress.org/support/topic/invalid-argument-in-script-loader-after-update-to-5-8/

posted @ 2022-10-09 10:15  贵隆  阅读(38)  评论(0编辑  收藏  举报