wordpress配置google search console失败_Wordpress在国内无法打开后台撰写新文章的解决办法...

今天突然公司负责网站编辑的同事说公司网站后台打不开编辑功能了。

由于我的电脑是设置了自动缓存页面,而且从来不清理的,估计也是一些众所周知的原因导致的了,马上进行抓包分析。

500a482ad3640358c24764dee4246e64.png

对源代码搜索.google

找到了这个导致无法打开页面的元凶后,就估计调用文件的位置,既然是framework,那就到wordpress主题文件的文件夹里找到下面的文件。

/wp-content/themes/你的主题文件夹/framework/php/class-gmaps.php

搜索.google,果然找到了以下的代码

if( ! class_exists( 'av_google_maps' ) ){class av_google_maps{//maintain URL and version number here for all objects using this elementconst API_URL='https://maps.googleapis.com/maps/api/js';const API_VERSION='3.30';const MAPS_SEARCH_URL='https://www.google.com/maps/search/';const AJAX_NONCE='av_google_maps_nonce';/** * Holds the instance of this class *  * @since 4.3.2 * @var av_google_maps  */static private $_instance = null;

修改成,特别注意,国内的地址和国外的地址域名和形式是不同的:

if( ! class_exists( 'av_google_maps' ) ){class av_google_maps{//maintain URL and version number here for all objects using this elementconst API_URL='https://ditu.google.cn/maps/api/js';const API_VERSION='3.30';const MAPS_SEARCH_URL='https://www.google.com/maps/search/';const AJAX_NONCE='av_google_maps_nonce';/** * Holds the instance of this class *  * @since 4.3.2 * @var av_google_maps  */static private $_instance = null;

保存文件后,刷新页面就可以了。

5ad654cf5edcfde27b0466f0adfa6b90.png

网站后台

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值