WordPress自动为文章标签(关键词)添加链接-WordPress主题

摘要:很多朋友都在问有没有自动将文章中出现的标签加上链接?然后多次探索探究找到了自动将文章中出现的标签加链接的方法。这方法很简…

很多朋友都在问有没有自动将文章中出现的标签加上链接?然后多次探索探究找到了自动将文章中出现的标签加链接的方法。这方法很简单,将下面的代码添加到主题的 functions.php 即可:

你可以根据自己的需要修改文章标签的链接数。

PS:真的找不到该代码的原始出处,如果有知道的,烦请告知。

倡萌测试:该代码会自动为这篇文章的标签添加链接,但是 $match_num_from 和 $match_num_to 这两个参数的设置很有意思(不够准确,具体请自己测试)

来源:http://www.wazhuti.com/690.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13186.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?