When you post comments on a wordpress site, if you fill in the site url, a hyperlink is automatically added to the reviewer's name. If you do not want to add this link, you can use the following methods to block it.
Add the code to functions. php in the topic folder:
| The code is as follows: |
Copy code |
Add_filter ('Get _ comment_author_link ', 'web589 _ comment_author_link '); Function web589_comment_author_link ($ link ){ $ Args = array ('/<a. *?> /','/</A> /'); $ Link = preg_replace ($ args, '', $ link ); Return $ link; } |
Another method is to add nofollow to the connection.
1. Open the comment-template.php file under the wp-topics folder
2. Find the $ return = "<a href = '$ url' rel = 'external nofollow' class = 'URL'> $ author </a>" statement.
3. Change the link to a href = '/go. php? $ URL'
4. Replace Upload
Similarly, you can modify the formatting. Php file in the wp-nodes des folder and modify the link structure written in the comments.
| The code is as follows: |
Copy code |
| Return $ matches [1]. "<a href =" $ url "rel =" nofollow "> $ url </a> "; |
Go. php:
| The code is as follows: |
Copy code |
<? Php Header ("location:". $ _ SERVER ['redirect _ QUERY_STRING ']); ?> |