Home >Web Front-end >HTML Tutorial >Remove URL text box in wordpress comment form_html/css_WEB-ITnose

Remove URL text box in wordpress comment form_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:55:291004browse

The original effect is as follows

If you want to remove this link form, the generally thought of method is to find the corresponding form code in the comments.php file and delete it. But now it only needs a very simple piece of code to remove it:

Copy the code as follows
add_filter('comment_form_default_fields', 'unset_url_field');
funct(www.111cn.net)ion unset_url_field ($fields){
if(isset($fields['url']))
unset($fields['url']);
return $fields;
}

Just add the above code to the functions.php file in the theme to delete the website link form
from:http://www.111cn.net/wy/wordpress/68255.htm

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn