Methods to disable / delete URL form item of WordPress comment website

If we use the default theme of WordPress or most of the themes, there are several options in the comments, such as nickname, URL, email, and comment content. We are sure that many people have noticed that some netizens’ return visit comments are not used for real comments, but want to leave their own website URL to improve the traffic access and weight use.

These are not surprising, the most hateful is, in case of malicious people will stay bad website may cause unnecessary trouble. So we can force the form option to be removed. You can only fill in the nickname, email and comments.

/ / remove URL form items < br > fromfunction url_ filtered($fields)
return $fields;
add_ filter(‘comment_ form_ default_ fields’, ‘url_ filtered’);

//Remove the link of comment nicknamefunction disable_ comment_ author_ links( $author_ link ){
return strip_ tags( $author_ link );
add_ filter( ‘get_ comment_ author_ link’, ‘disable_ comment_ author_ links’ );

We add the code to the current topic Functions.php File, the role is not to see the URL form when commenting, and the nickname of previous comments, if with a URL link, are also removed.

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