国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > Wordpress > 正文

wodpress博客的評論外鏈加上跳轉的方法

2024-09-07 00:52:21
字體:
來源:轉載
供稿:網友

wodpress博客的評論外鏈已經是許多博主不可接受的一種程度了,我們下面來給各位介紹一篇把外連通過修改成跳轉的連接了,這樣不會影響到網站權重了.

昨天的時候修改了一下博客的評論里的外鏈,有外鏈轉內鏈,折騰了一下博客,看看效果還行,下面分享一下.

模板function.php添加下面的代碼:

  1. /**博客的評論里的外鏈轉內鏈**/ 
  2. add_filter('get_comment_author_link','add_redirect_comment_link', 5); 
  3. add_filter('comment_text''add_redirect_comment_link', 99); 
  4. function add_redirect_comment_link($text''){ 
  5.   $text=str_replace('href="','href="'.get_option('home').'/goto.php?url='$text); 
  6.   $text=str_replace("href='","href='".get_option('home')."/goto.php?url="$text); //Vevb.com 
  7.   return$text

上面的代碼其實就是把頁面顯示的鏈接都修改成http://m.survivalescaperooms.com/goto.php?url=【網站鏈接】

新建goto.php,放到跟目錄下.

  1. <!doctype html> 
  2. <html lang="en"> 
  3. <head> 
  4. <meta charset="UTF-8"> 
  5. <meta name="Author" content=""> 
  6. <meta name="Keywords" content=""> 
  7. <meta name="Description" content=""> 
  8. <meta name="robots"content="noindex,nofollow"> 
  9.  
  10. <meta http-equiv="refresh"content="3;url=<?php $url=$_GET['url']; echo htmlspecialchars($url);?>"> 
  11. <title>跳轉頁面</title> 
  12. <style> 
  13. .spinner { 
  14. margin: 100px auto 0; 
  15. width: 150px; 
  16. text-align: center; 
  17.  
  18. .spinner > div { 
  19. width: 30px; 
  20. height: 30px; 
  21.  
  22.  
  23. border-radius: 100%; 
  24. display: inline-block; 
  25. -webkit-animation: bouncedelay 1.4s infinite ease-in-out; 
  26. animation: bouncedelay 1.4s infinite ease-in-out; 
  27. /* Prevent first frame from flickering when animation starts */ 
  28. -webkit-animation-fill-mode: both; 
  29. animation-fill-mode: both; 
  30.  
  31. .spinner .bounce1 { 
  32. -webkit-animation-delay: -0.32s; 
  33. animation-delay: -0.32s; 
  34. background-color: #428bca; 
  35.  
  36. .spinner .bounce2 { 
  37. -webkit-animation-delay: -0.16s; 
  38. animation-delay: -0.16s; 
  39. background-color: #Dd534F; 
  40.  
  41. .spinner .bounce3 { 
  42. -webkit-animation-delay: -0.01s; 
  43. animation-delay: -0.01s; 
  44. background-color: #67CF22; 
  45.  
  46. @-webkit-keyframes bouncedelay { 
  47. 0%, 80%, 100% { -webkit-transform: scale(0.0) } 
  48. 40% { -webkit-transform: scale(1.0) } 
  49.  
  50. @keyframes bouncedelay { 
  51. 0%, 80%, 100% { 
  52. transform: scale(0.0); 
  53. -webkit-transform: scale(0.0); 
  54. } 40% { 
  55. transform: scale(1.0); 
  56. -webkit-transform: scale(1.0); 
  57. </style> 
  58. </head> 
  59. <body> 
  60. <div class="spinner"> 
  61. <div class="bounce1"></div> 
  62. <div class="bounce2"></div> 
  63. <div class="bounce3"></div> 
  64. </div> 
  65. </body> 
  66. </html> 

搞定了,有問題請留言.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 大城县| 紫金县| 凌云县| 朝阳市| 安康市| 桐庐县| 临沂市| 武平县| 宁强县| 莆田市| 蒲城县| 绥宁县| 云南省| 措美县| 巫溪县| 扎囊县| 德安县| 那曲县| 九寨沟县| 福泉市| 张掖市| 潮安县| 抚顺市| 黑水县| 营山县| 丹凤县| 陈巴尔虎旗| 五常市| 黄石市| 延长县| 金沙县| 晋城| 神池县| 广东省| 奎屯市| 九寨沟县| 达孜县| 商城县| 杭锦旗| 吴旗县| 淮南市|