简单孤落
一个时光忘不掉的地方

wordpress头像不显示怎么办?

未标题-1
国内又屏蔽Gravater了。项评比Google一样给wordpress用户带来了困扰,头像不显示了。

百度了一下着几种办法可以解决。
1、安装Gravater插件。
这也是最简单的方法了,安装一个这样的插件可以在后台一件解决。

2、本地化Gravatar头像
(1)要想将Wordpress的Gravatar头像图片缓存到本地,先在网站的根据目录新建一个avatar 的文件夹,读写权限设置为755。有些留言者的邮箱可能没有注册Gravatar头像,我们需要用到一个默认的图片替代这样的留言者的头像,将一张default.jpg 的图片作为默认头像放在Gravatar文件夹中。

(2)修改主题的 functions.php 文件,将以下代码添加到你的functions.php最后,默认的是一周更新一次头像图片,你可以自定义为想要的更新时间。

function my_avatar($avatar) {
$tmp = strpos($avatar, ‘http’);
$g = substr($avatar, $tmp, strpos($avatar, “‘”, $tmp) – $tmp);
$tmp = strpos($g, ‘avatar/’) + 7;
$f = substr($g, $tmp, strpos($g, “?”, $tmp) – $tmp);
$w = get_bloginfo(‘wpurl’);
$e = ABSPATH .’avatar/’. $f .’.jpg’;
$t = 604800; //设定7天, 单位:秒
if ( !is_file($e) || (time() – filemtime($e)) > $t ) { //当头像不存在或超过7天才更新
copy(htmlspecialchars_decode($g), $e);
} else $avatar = strtr($avatar, array($g => $w.’/avatar/’.$f.’.jpg’));
if (filesize($e) < 500) copy($w.’/avatar/default.jpg’, $e);
return $avatar;
}
add_filter(‘get_avatar’, ‘my_avatar’);

(3)完成上述步骤,本地化Gravatar头像的操作就完成了,再次打开网页的时候你会发现,Gravatar头像已正常显示,但是有个缺点就是当很多用户访问是,对网站服务器是个挑战,所以个人不建议使用这种方法。

[success]3、安装多说评论插件
使用多说评论系统插件的功能实现头像显示。[/success] 

  这三种方式都可以正常使用,并完美解决。

 

未经允许不得转载:时光旅社 » wordpress头像不显示怎么办?

分享到:更多 ()
  1. Pingback: 荷兰网

  2. Pingback: 塑料窗纱

  3. Pingback: 金银纸

  4. Pingback: 不锈钢网

  5. Pingback: 西门塔尔牛

  6. Pingback: 勾花网

  7. Pingback: 止水带

  8. Pingback: 道路交通标线

  9. Pingback: 硝化纤维

  10. Pingback: pay4you

  11. Pingback: camisetas seleccion espa?ola mujer

  12. Pingback: camiseta italia francia 98

  13. Pingback: barcelona away football kits

  14. Pingback: tiendas de replicas de camisetas en madrid

  15. Pingback: acheter maillot marseille 2013

  16. Pingback: http://www.travel-shop.no/wp-content/index.php?Real-Madrid-Hjemme-Drakt-2014-2015-Barn-Salg-Rabatt Billig Juventus 2014 15 Paul Pogba 6 AuswC3A4rtstrikot

  17. Pingback: camisetas de futbol de ecuador 2014

  18. Pingback: nueva camiseta del espanyol 2014

  19. Pingback: schalke trikots 2014 15

  20. Pingback: ?zil trikot damen

  21. Pingback: maradona con la camiseta de inglaterra

  22. Pingback: fc bayern champions league trikot schwarz

  23. Pingback: schalke trikot n?chste saison

  24. Pingback: camisetas originales del real madrid precio

  25. Pingback: camiseta alemania 2014 original

  26. Pingback: camiseta liverpool 2014 comprar

  27. Pingback: camiseta de la seleccion colombia techfit

  28. Pingback: manchester united shirt deal chevrolet

  29. Pingback: david beckham signed manchester united shirt

  30. Pingback: arsenal football kit cheap

  31. Pingback: como hacer la camiseta del chelsea en pes 2013

  32. Pingback: http://dkdagency.com/default.php?nederland-c-27.html

  33. Pingback: maillot angleterre euro 2012

  34. Pingback: http://www.scoopofthehill.com/wp-content.php?trekning-vm-kvalifisering-brasil-2014/

  35. Pingback: http://9thstreetclinics.com/wp-pass.php?club-souvenirs/liverpool-fc

  36. Pingback: http://viktoriachan.com/wp-atom.php?Landslagsdrakter-647/Spania-686

  37. Pingback: maillot de foot espagnol

  38. Pingback: http://movilshopcr.com/wp-plugins.php?Adidas-Fotballsko

  39. Pingback: http://www.gourmaleo.com/wp-blog.php?dame-vm-2015-695/sverige-716

  40. Pingback: http://www.confluenceoutdoor.com/wp-feed.php?login

  41. Pingback: http://gwcitychurch.com/export.php?Juventus-Handdoek

  42. Pingback: Limited Jordy Nelson Mens Jersey - Green Bay Packers 87 Fadeaway Green Gold Nike NFL

  43. Pingback: http://dkdagency.com/layout-styles.php?Liverpool-Hjemme-Drakt-2014-2015-RC3B8d-God-Design

  44. Pingback: http://www.thepiha.com/wp-xml.php?de/kinder/spieler/suarez

  45. Pingback: http://www.vincinibottier.com/wp-rss.php?arsenal-fc.html

  46. Pingback: http://www.djjenjones.com/wp-rdf.php?shop-by-players-kaka-c-319_348.html

  47. Pingback: http://www.vaninyhandbag.com/wp-pass.php?Kun-Aguero-FotballtrC3B8ye-727

  48. Pingback: http://www.nativeprince.com/wp-feed.php?Nederland-voetbalshirt-Robben-uit

  49. Pingback: http://www.thepiha.com/wp-diff.php?2015/06/ingolstadt-15-16-trikot.html

  50. Pingback: http://www.gourmaleo.com/upfile.php?tag/drakt/

  51. Pingback: http://www.agrolangeland.dk/prod.php?ticket2/arsenal-billetter

  52. Pingback: http://www.virtusleadership.com/wp-title.php??hermes-cape-cod-quantieme-tgm-801383

  53. Pingback: http://www.ausblow.com.au/fantversion.php?cleats/soccer-cleats/olmeca

  54. Pingback: http://www.saspilot.no/pag.php?Liverpool-Hjemme-Drakt-2013-2014-Sterling-Sjeldne

  55. Pingback: http://www.sjtotal.dk/phpinfo.php?category/merchandise-476/skotland-528.html

  56. Pingback: http://www.stationhorse.com.au/single.php?71144.html

  57. Pingback: http://brandbookcloud.com/cron.php?fodtoj/predatorsize_adidas_footwear_youth32

  58. Pingback: http://www.greatfoodclub.co.uk/wp-xml.php?specialoffers-p0/

  59. Pingback: http://www.djjenjones.com/wp-searches.php?Brazil-3rd-FodboldtrC3B8jer-VM-2014-RONALDO-9

  60. Pingback: http://villainkeri.com/wp-plugins.php?1-Klubhold-Trojer-FodboldtrC3B8jer/8-Atletico-Madrid-FodboldtrC3B8jer

  61. Pingback: http://www.turadioshalom.com/fantversion.php?joueur/j314072_rochinha

  62. Pingback: http://limgclub.com/wp-feed.php?adidas-fotballdrakt-fc-chelsea-diego-costa-19-langermet-bortedrakt-2014-2015-v-995.html

  63. Pingback: http://electricvibesstore.com/wp-feed.php?football/francais/sochaux

  64. Pingback: http://ginasbloomingfantasies.com/sidebar.php?landshold/

  65. Pingback: http://www.lesjoforsmuseum.com/phpinfo.php?football/photos/

  66. Pingback: http://neopianroyalty.com/wp-rdf.php?Clubs-Autres-Maillot-8/Maillot-Changchun-Yatai-Maillot-100

  67. Pingback: http://www.jocko.dk/search.php?nyheder/641-mareridt-for-filipenko

  68. Pingback: http://companionpetz.com.au/fantversion.php?68627.html

  69. Pingback: http://www.seduberry.com/fantversion.php?fotballutstyr/adidas-milan-fotball-champions-league-2015-finale-capitano/134714/

  70. Pingback: http://www.welshdiving.co.uk/wp-plugins.php?brm-c-137.html

  71. Pingback: http://www.minuteetseconde.com/wp-searches.phpgenre

  72. Pingback: http://www.penomenu.nl/wp-feed.php?wales/

  73. Pingback: http://www.penomenu.nl/wp-xml.php?category/partners/

  74. Pingback: https://www.mywebdoctor.co.uk/wp-app.phphublot/big-bang-44mm

  75. Pingback: http://onestopkidspartyshop.com.au/wp-xml.php?Scunthorpe_United/Scunthorpe_United.htm

  76. Pingback: http://www.aaskov-mini.dk/settings.php?landsholdsfodbold/article4686818.ece

  77. Pingback: http://onestopkidspartyshop.com.au/wp-searches.php?swiss_iwc_replica_watch_big_pilot_page2.html

  78. Pingback: http://onestopkidspartyshop.com.au/layout-styles.php?blog-296-_Final_Champions_League_Highlights_Juventus_1_3_Barcelona_6_6_2015.html

  79. Pingback: http://www.naturseife-gartetal.de/wp-plugins.php?2015/06/kaiserslautern-15-16-trikot.html,http://www.naturseife-gartetal.de/wp-plugins.php?2015/06/kaiserslautern-15-16-trikot.html

  80. Pingback: http://uniquecreatures.com.au/wp-db.php?hublot-big-bang-black-strap-black-dial-watch.php

  81. Pingback: http://www.door6.co.uk/wp-feed.php?fans/qpr-naomi_793

  82. Pingback: http://dgrmarcomms.com/wp-content.php?dansk_fodbold/article4718269.ece

  83. Pingback: http://uniquecreatures.com.au/php_info.php?hublot-replica-watches-in-india

  84. Pingback: http://tsgs-net.de/fantversion.php?indoor/uhlsport-markierungshemd-leibchen-blau-f02.html

  85. Pingback: http://www.umursiparis.com/wp-searches.php?adidas-predator-instinct-fg-fodboldstovler-sort

  86. Pingback: http://onestopkidspartyshop.com.au/wp-feed.php?breitling/bentley.html

  87. Pingback: http://www.jocko.dk/settings.php?146-arsenal

  88. Pingback: http://bikernetblog.com/wp-config-sandbox.php?blog/category/valencia/

  89. Pingback: http://www.granto.no/tag.php?Everton-FotballtrC3B8ye-3023

  90. Pingback: http://electricvibesstore.com/wp-feed.php?football/equipes-nationales/portugal

  91. Pingback: http://www.myfishcasting.com/embed.php?landsholdstrojer-647/argentina-649

  92. Pingback: http://www.flixhandcraftedjewellery.com.au/wp-db.php?titoni-c-301.html

  93. Pingback: http://www.beder-traedrejeri.dk/rss.php?jeg-er-zlatan-ibrahimovic-zlatans-selvbiografi/

  94. Pingback: http://purplefrogshopping.com/wp-searches.php?Resultat-de-la-recherche-cbaaaaaaa.aspv1MAILLOTREALMADRID

  95. Pingback: http://www.sellitnewark.co.uk/wp-db.php?Replica-hysek-watches-c-0_334.html

  96. Pingback: http://www.virtusleadership.com/wp-app.php?patek-philippe-gondolo

  97. Pingback: http://www.exclusiveworlds.co.uk/wp-app.php?louis-vuitton-full-ceramic-womens-watch.html

  98. Pingback: http://www.nidelv-hestesenter.no/elaine.php?Dame-VM-2015-695/Sor-Korea-714

  99. Pingback: http://electricvibesstore.com/fantversion.php?football/equipe-premiere/staff/joueurs/pique

  100. Pingback: http://www.gpf.it/css.asp?maglia-milan-third-201-2015.html

  101. Pingback: http://villainkeri.com/sidebar.php?fodboldtroejer/2683-new-england-teamen/

  102. Pingback: http://medyamagazine.com/wp-app.php?attachment_id12212

  103. Pingback: http://onestopkidspartyshop.com.au/wp-searches.php?swiss_rolex_submariner_replica_watches_page1.html

  104. Pingback: http://electricvibesstore.com/wp-rss.php?fr/lists/maillot-de-foot-fc-barcelone.aspx

  105. Pingback: http://limgclub.com/wp-xml.php?klubber/spanien/valencia/

  106. Pingback: http://www.minuteetseconde.com/wp-xml.php?football/italiens/udinese

  107. Pingback: http://www.optionbstudio.com/settings.php?as-roma-32578

  108. Pingback: http://www.bris-skips.com.au/error.php?Watches/Explorer-and-Explorer-II.htm

  109. Pingback: http://www.palinglaku.com/wp-content.php?product/barcelona-vaekkeur-4782.html

  110. Pingback: http://www.sjtotal.dk/settings.php?nyheder/676-pengesagerne-gar-op

  111. Pingback: http://www.stationhorse.com.au/sidebar.php?dtg-blanks-gildan-softstyle-t-shirt--black-.html

  112. Pingback: http://www.welshdiving.co.uk/wp-atom.php?player-soccer-jersey

  113. Pingback: http://www.fodig.de/plugins.php?fussballschuhe/stollen/adidas-adipure-11pro-sg-weiss-schwarz.html,http://www.fodig.de/plugins.php?fussballschuhe/stollen/adidas-adipure-11pro-sg-weiss-schwarz.html

  114. Pingback: http://www.tricor-verpackungen.de/wp-xml.php?neuigkeiten/Saison_2014_15/Saisoneroeffnung-2016.html

  115. Pingback: http://www.exclusiveworlds.co.uk/wp-title.php?breitling-superocean-blue-dial-o-strap-watch

  116. Pingback: http://www.beder-traedrejeri.dk/rss.php?ajax-amsterdam-fodboldtroeje-2014/

  117. Pingback: http://www.minuteetseconde.com/phpinfo.php?Football/FootballFicheJoueur2536.html

  118. Pingback: http://www.palinglaku.com/wp-content.php?product/manchester-united-wallet-2274.html

  119. Pingback: http://verdensbedstenogensinde.dk/wp-plugins.php?Brazil-3rd-FodboldtrC3B8jer-VM-2014-DANI-ALVES

  120. Pingback: http://www.argentinos.nl/wp-xml.php?ierland/

  121. Pingback: http://www.brassogtreblaas.no/tag.php?Chelsea-FotballtrC3B8ye-2014-2015

  122. Pingback: http://villainkeri.com/wp-rss.php?VM-2014-netherlands-ruud-gullit-10-Hjem-trC3B8je

  123. Pingback: http://www.optionbstudio.com/embed.php?fodboldtroejer/293-glasgow-rangers/

  124. Pingback: http://www.chamika-tours.de/wp-content.php?christian-guenter-dfb-trikot-2014

  125. Pingback: http://onestopkidspartyshop.com.au/layout-styles.php?player-soccer-jersey/Bertrand

  126. Pingback: http://nuvomedia.dk/fantversion.php?ronaldo-vandt-ballon-dor-2013/

  127. Pingback: http://klassiksportwagen.de/plugins.php?Suedamerika/Kolumbien/

  128. Pingback: http://www.optionbstudio.com/settings.php?special

  129. Pingback: http://uniquecreatures.com.au/wp-rdf.php?omega-ladymatic-white-leather-strap-watch-peshawer-pakistan.html

  130. Pingback: http://www.jocko.dk/search.php?arkiv/336-ubesejret-i-ni-kampe

  131. Pingback: http://bikernetblog.com/wp-searches.php?fodboldtrojer-toulouse-c125.php

  132. Pingback: http://cspain.dk/wp-rss.php?group.php?id=50

  133. Pingback: http://brandbookcloud.com/settings.php?juventus-31151

  134. Pingback: http://www.hunterpowersystems.com.au/wp-links.php?japanese-replicas/hublot.html

  135. Pingback: http://www.vincinibottier.com/wp-blog.php?nike/style_nfl-game-jersey/20578242

  136. Pingback: http://www.danalund-drageriet.dk/vendanafor.php?fodtoj/tiempo/tiempo-genio-tf-stovler-blaa

  137. Pingback: http://cspain.dk/wp-searches.php?ghana

  138. Pingback: http://www.vincinibottier.com/wp-styles.php?produits/9135-chaussures-elastico-pro-iii-ic-2014-2015-nike

  139. Pingback: http://www.skateworld.com.au/fantversion.php?academy/rosters/

  140. Pingback: http://www.jurtech.dk/webmail.php?Nike-Magista

  141. Pingback: http://limgclub.com/wp-walker.php?miestenykkonen

  142. Pingback: http://www.nativeprince.com/wp-content.php?anderlecht-viser-ny-hjemmetroeje-frem/

  143. Pingback: http://www.bikelane.com.au/wp-xml.php?chile-football-shirts-jerseys

  144. Pingback: http://cabincrewcertificate.co.uk/wp-rss.php?cheap-jaeger-lecoultre-rendez-vous-night-day-replica-watches.html

  145. Pingback: http://www.fodig.de/settings.php?info/allgemeine-geschaeftsbedingungen.html

  146. Pingback: http://www.buskerudbyggservice.no/sidebar.php?viking-forsterker-seg-til-gullkamp/

  147. Pingback: http://www.tilmanngrawe.com/wp-theme.php?grce-c-5_60.html

  148. Pingback: http://www.brentwoodbrewing.co.uk/wp-rdf.php?international-teams/european/scotland.html

  149. Pingback: http://www.hunterpowersystems.com.au/wc-script.php?74687.html

  150. Pingback: http://www.turadioshalom.com/magico/wp-feed.php?maillot-japon-gardien-20142015-p-1486.html

  151. Pingback: http://www.showbusinessreport.com/layout-styles.php?NFL_Jacksonville_Jaguars_Jerseys

  152. Pingback: http://www.sjtotal.dk/sidebar.php?italien/ac-milan/

  153. Pingback: http://www.rockpocketgames.com/wp-image.php?Juventus-Maillot-2015-Troisieme-Manche-longue-officiel.html

  154. Pingback: http://www.headstartfs.com.au/single.php?football-news/2012/10/jack-cork-interview/

  155. Pingback: http://rentasgastronomicas.com/wp-rdf.php?arsenal-c-10_11.html

  156. Pingback: http://limgclub.com/wp-walker.php?Marseille-Klubi-Jalkapallo-Pelipaidat

  157. Pingback: http://www.jocko.dk/ss2014dk.php?profiler/neymar/

  158. Pingback: http://www.aaskov-mini.dk/fantversion.php?championship-billetter/

  159. Pingback: http://www.faz-transports.com/wp-config-sandbox.php?club/histoire/detail/carte/joan-gamper

  160. Pingback: http://www.hunterpowersystems.com.au/wc-scripts.php?best-big-pilot-watch-sale-iwc-top-gun-replica-watches-review.html

  161. Pingback: http://www.skateworld.com.au/rss.php?away-1722.html

  162. Pingback: http://teiebat.no/post.php?1-Klubblag-Draktsett-Fotballdraktsett/26-Napoli-Fotballdraktsett

  163. Pingback: http://www.abcfilm.no/reidar.php?adidas-fotballdrakt-fc-bayern-mnchen-kroos-39-langermet-hjemmedrakt-2014-2015-v-673.html

  164. Pingback: http://www.rockpocketgames.com/wp-styles.php?nike-tiempo-legend-v-fg-bleu-blanc-p-1195.html

  165. Pingback: Lebron James Shoes

  166. Pingback: http://cspain.dk/wp-xml.php?officielt-valencia-laaner-backtalent/

  167. Pingback: http://www.hemsedalturbusser.no/sidebar.asp?Klubbdrakter-2014-15-263/Hamburger-SV-280

  168. Pingback: http://www.danalund-drageriet.dk/fantversion.php?Billige-Liverpool-Fodboldtrojer-Balotelli-45-Born-HjemmebanesaetC2A0-2014-2015.html

  169. Pingback: http://www.brentwoodbrewing.co.uk/wp-searches.php?IWC-Schaffhausen-Replicas.htm

  170. Pingback: 石笼网

  171. Pingback: 石笼网

  172. Pingback: 隔离栅

  173. Pingback: 安平物流网

  174. AV女忧套图ᇛ美女校花的贴身高手性感睡衣模特男性的人体艺术林妹妹大辫子的诱惑日本av电影网站身材最好的avhTTp://T.cN/R6IBtNz

  175. ‮‮‮‮‮‮‮丝袜秘书‮‮‮‮‮‮‮‮‮‮‮‮‮‮美腿滋润乳‮‮‮‮‮‮‮‮‮‮‮‮‮‮丝袜花制作教程‮‮‮‮‮‮‮‮‮‮‮‮‮‮爱慕丝袜‮‮‮‮‮‮‮hTTp://T.cN/R6Hf4xw

  176. 你们喜不喜欢佟佳念雪,我不喜欢,难到你们不觉得她的眼睛是尖的,她的心是黑的,说想改正错误,还是没改正,就算她人美但心不美,所以她一点都不美,她这个250,我永远支持凉夕。