长沙快付新闻资讯
您当前的位置是: 首页->技术资讯->做网站系统

安装地图插件后发布文章出现乱码怎么解决

首发: 长沙快付 版权所有,未经许可严禁转载
   wordpress网站安装《Baidu Sitemap Generator插件》后能生成百度 Sitemap XML 文件。就相当于网站被百度中文搜索引擎订阅,进而为您的网站带来更大的流量。同时生成一个静态的站点地图页面,对所有的搜索引擎都有利。但安装长沙做网站这个Baidu Sitemap Generator1.50版本的插件后,可可发现每次在后台发布文章时都会出现如下乱码
  
  Warning: Illegal string offset 'lc_is_update_sitemap_when_post' in /home/zxxseoco/public_html/wp-content/plugins/baidu-sitemap-generator/baidu_sitemap.php on line 406
  
  Warning: Cannot modify header information - headers already sent by (output started at /home/zxxseoco/public_html/wp-content/plugins/baidu-sitemap-generator/baidu_sitemap.php:406) in /home/zxxseoco/public_html/wp-admin/post.php on line 235
  
  Warning: Cannot modify header information - headers already sent by (output started at /home/zxxseoco/public_html/wp-content/plugins/baidu-sitemap-generator/baidu_sitemap.php:406) in /home/zxxseoco/public_html/wp-includes/pluggable.php on line 1121
  
  出现这个乱码应该如何解决呢?正确解决的方法是在你的FTP找到baidu_sitemap.php文件把它下载下来,用DW打开,找到406至410行把如下代码:
  
  if($get_baidu_sitemap_options[' lc_is_update_sitemap_when_post '] == ’1′){
  wp_clear_scheduled_hook(‘do_baidu_sitemap_by_post’);
  wp_clear_scheduled_hook(‘do_this_auto_daily’);
  wp_schedule_single_event(time()+10, ‘do_baidu_sitemap_by_post’);
  }
  
  替换成
  
  //if($get_baidu_sitemap_options[' lc_is_update_sitemap_when_post '] == ’1′){
  wp_clear_scheduled_hook(‘do_baidu_sitemap_by_post’);
  wp_clear_scheduled_hook(‘do_this_auto_daily’);
  wp_schedule_single_event(time()+10, ‘do_baidu_sitemap_by_post’);
  //}
  
  代码就可以了,现在发布文章时再也不会出现乱码了。
  • 最新签约客户
  • 最新上线网站
为什么选择长沙快付公司?

8年专业做网站经验
帮助您解决各种需求,并得到满意方案

效果满意后付款
预付30%定金,效果让您满意后,付全款

资深用户体验设计师
秉承"一切以用户价值为依归"理念,重视用户体验,专为企业需求进行定制

采用国际标准结构建站
DIV+CSS国际标准构建网页,可有效提高网站访问速度、提高网站页面的可维护

实现网络营销[SEO]最大化
网站程序中融入SEO,有效降低企业成本

分享到: