国产探花免费观看_亚洲丰满少妇自慰呻吟_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://www.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> 

搞定了,有問題請留言.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 崇阳县| 宁阳县| 公主岭市| 穆棱市| 洪雅县| 富蕴县| 中宁县| 新化县| 张掖市| 巴里| 武安市| 梅河口市| 岗巴县| 吴旗县| 游戏| 泰州市| 墨玉县| 汝州市| 牡丹江市| 克什克腾旗| 宁远县| 温宿县| 建水县| 中江县| 灌南县| 平南县| 射洪县| 凉城县| 德安县| 瑞安市| 孙吴县| 乐陵市| 鹤庆县| 抚远县| 屏山县| 莱西市| 瑞安市| 略阳县| 鲁甸县| 团风县| 温宿县|