思来想去,不能就这么放弃了,于是考试测验的主动推送百度,末了结果如何,我也旁边不了啦,总比等着强,下面将我的方法整理一下。
首先须要去百度的搜索资源平台注册账号,地址为:https://ziyuan.baidu.com/
注册完之后按照哀求添加自己的站点,相信这块大家都知道怎么操作,我就不在累絮啦。

重点在”资源提交->普通收录”中,我们利用api接口提交,把稳自己token,那是百度分配给你的。
在wordpress的funcions.php中添加代码
function save_post_xxzhuti_baidu($post_id, $post, $update)
{
if($post->post_status != 'publish') return false;
$res = check_ispost_baidu($post_id);
if(!empty($res)) return false;
$url = get_permalink($post_id);
$api = 'http://data.zz.baidu.com/urls?site=https://www.xxzhuti.com&token=您的token';
$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 = curl_exec($ch);
}
add_action('save_post', 'save_post_xxzhuti_baidu', 10, 3);
这样再保存和修正文章时都会将文章提交到百度,我也不知道终极百度会不会解封,先这样着吧。