How to Get Rid of the Comment URL Field on WordPress
The WordPress core includes a function to allow article commenters to include a URL with their comment. Many themes take advantage of this function by including a URL or website field in the comment template. If you don't want to give commenters the option to attach a URL to a comment, you can easily disable the code within the comment template.
Instructions
-
-
1
Sign into your dashboard and hover your mouse over the "Appearance" icon on the left. Click "Editor" to display the theme files.
-
2
Click "comments.php." This opens the comments template.
-
-
3
Browse through the template until you arrive at code that looks similar to the following:
<label for="URL"><?php _e('Website', 'wpzoom'); ?>:</label>
<input type="text" name="URL" id="URL" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
-
4
Type the code to comment out the HTML at the beginning and end of the URL-generating line. The result should look like this:
<!-- <label for="URL"><?php _e('Website', 'wpzoom'); ?>:</label>
<input type="text" name="URL" id="URL" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> -->
Note the space between the dashes in the code to comment it out and the opening and closing tags.
-
5
Save the changes to comment out the URL form-generating code. Check your site---the results will appear immediately.
-
1
Tips & Warnings
You can also simply delete the URL form-generating code. If you do this, make a copy of your comments.php file in case you want to bring the URL form back.
If you comment out the code then change your mind, remove the opening <!-- and closing --> tags from the URL form code.