WordPress removes the comment box URL form and limits existing comment nickname links

The purpose of most netizens in the blog comments is to leave their own website links, promote their own website and get a little weight. Although in recent two years, with the change of search engine algorithm to reduce the weight of comments, there are still many users who are busy with these things. Of course, it also includes a large number of potential netizens like Lu Songsong’s blog comments in order to get the return visit traffic.

When visiting the Moonlight blog, we saw that there were still many comments below. The URL text box that submitted the comment box had been removed, and the location of the user’s nickname didn’t point to the URL. This is bound to give users a return visit and reduce the user experience, but it can reduce spam comments and invalid user messages. Those who really need interactive messages may not care whether they leave links or not.

As a result, we tribe also plans to cancel the option of URL text box, and cancel the previous comments with URL nicknames. Originally, they planned to use third-party comments, but they are not ready to start them for the time being. Now they are investigating which third-party comments to choose.

First, forbid comment form text box code

/ / remove the default comment URL text box < br > fromadd_ filter(‘comment_ form_ default_ fields’, ‘unset_ url_ field’);
function unset_ url_ field($fields){
return $fields;

There is a problem. The general default theme can be removed automatically, but most themes will have custom fields, so we can’t cancel the URL form text box. We need to remove it manually.

Second, manually remove the text box URL

If you can still see the submission text box of the comment URL address by using the above code, we need to solve this problem in the template. ( comments.php )

Find the location of the text URL and remove the replacement. Here we are not familiar with a backup, and then make a mistake can be saved.

It seems that deletion is right. What we want is this effect.

Third, batch prohibit existing URL comment nickname

/ / delete linked nickname URLsfunction disable_ comment_ author_ links( $author_ link ){
return strip_ tags( $author_ link );
add_ filter( ‘get_ comment_ author_ link’, ‘disable_ comment_ author_ links’ );

If you have a comment nickname with URL before, you can ban it in batches through the above code. First, the third in the code, all manually added to the current theme Functions.php File.

Related Article
WordPress automatically intercepts part of the content of the article as a summary

In the daily release of articles, not every article may have an article summary, so the summary function of WordPress Read more

Implementation of tag inner chain association effect of WordPress program without plug-in

Nowadays, whether it is a large website or a personal blog, what matters is not the weight of the website Read more

Is in WordPress Theme_ Home () and is_ front_ Different usage of page ()

Under normal circumstances, when we use WordPress to build a website, the home page is the default index.php Just call Read more

How to delete the version number tail of WordPress scripts and CSS style sheets

As an excellent website building program, WordPress is undoubtedly the largest user group in the world in terms of user Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image