新聞中心
郵箱不設(shè)置Gravatar頭像后無法提交wordpress評論
最近無憂小編在建站的時候發(fā)現(xiàn)wordpress中有一個問題,就是當(dāng)提交評論的時候,wordpress會報錯“Error: gravatar not existed (check your email address”錯誤。一開始小編還以為是在模板上面或者程序上面程序不兼容導(dǎo)致的錯誤。之后無憂小編把這句話復(fù)制到翻譯軟件里面去,才得知這個報錯的意思是gravatar頭像不存在,請檢查郵箱地址,如果用官方點的解釋就是使用的郵箱沒有得到官方的設(shè)置gravatar頭像,所以導(dǎo)致無法提交成功。其實解決方法只需要添加一段代碼就可以解決郵箱不設(shè)置Gravatar頭像后無法提交wordpress評論這個問題。找到根目錄后找到comments-ajax.php中把如下的代碼添加上去!就可以解決這個報錯問題了 /** * @param $comment_author_email即$_POST['email'] */ $headers=@get_headers('http://1.gravatar.com/avatar/'.md5(strtolower($comment_author_email)).'?d=404'); if(strstr($headers[0],'404')) err('Error: gravatar not existed (check your email address).'); 無憂主機相關(guān)文章推薦閱讀: 添加WORDPRESS數(shù)據(jù)庫運行狀態(tài)日志 設(shè)置WORDPRESS評論達到數(shù)量后自動關(guān)閉評論 谷歌影響后WORDPRESS存在的問題并分析解決 WORDPRESS表單插件WP USER FRONTEND PROWWP
本文地址:http://m.love62.cn/wordpress/15682.html
![1](/wp-content/themes/starow_z/img/o-1.png)
![1](/wp-content/themes/starow_z/img/o-2.png)
![1](/wp-content/themes/starow_z/img/o-3.png)
![1](/wp-content/themes/starow_z/img/o-4.png)
![1](/wp-content/themes/starow_z/img/o-5.png)
![1](/wp-content/themes/starow_z/img/o-6.png)
![1](/wp-content/themes/starow_z/img/o-7.png)