利用百度Sitemap实时推送接口进行新文章的推送,进入百度站长平台,然后选择数据提交 > 链接提交
获取地址:http://zhanzhang.baidu.com/sitemap/pingadd
将地址下面代码中的地址并加到functions.php中即可:(代码来自'张戈博客',接口地址经过本人修改)

/**
 * 百度实时推送,不同于baidusitemap插件
 */
if(!function_exists('Baidu_Submit') && function_exists('curl_init')) {
    function Baidu_Submit($post_ID) {
        //已成功推送的文章不再推送
        if(get_post_meta($post_ID,'Baidusubmit',true) == 1) return;
        $url = get_permalink($post_ID);
        $api = get_option('inlo_baidu_push'); // 推送接口,后台设置填入
        $ch  = curl_init();
        $options =  array(
            CURLOPT_URL => $api,
            CURLOPT_POST => true,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_POSTFIELDS => $url,
            CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
        );
        curl_setopt_array($ch, $options);
        $result = json_decode(curl_exec($ch),true);
        //如果推送成功则在文章新增自定义栏目Baidusubmit,值为1
        if (array_key_exists('success',$result)) {
            add_post_meta($post_ID, 'Baidusubmit', 1, true);
        }
    }
    add_action('publish_post', 'Baidu_Submit', 0);
}