好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

wordpress发布文章时百度地图出错 - WordPress

wordpress发布文章时百度地图出错

最近遇到一个问题,在wordpress编辑文章发布的时候,百度地图插件Baidu Sitemap Generator会提示以下错误:

究其原因,是百度地图插件不能及时更新最新发布的文章导致的bug,以下是修复方法:

1、打开 baidu-sitemap.php 文件并找到 第 406 行的以下代码:

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’);  } 

2、把这段代码注释掉,注释后的代码如下:

//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’);  /

查看更多关于wordpress发布文章时百度地图出错 - WordPress的详细内容...

  阅读:51次