How to remove URL entry in comments form in WordPress atahualpa theme

WordPress allows visitors to your site to leave comments against each post. At times, this link can be used to point to irrelevant or irreverent web pages. To prevent this, you can remove the URL field from the comments form altogether. The below method applies in case you have the Atahualpa theme installed.

Before doing this, take a backup of your comments.php file of your web site. Open up the comments.php form of the Atahualpa theme on your blog. Now, remove the below line from the array in comments.php:

    'url'    => '<p><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"  tabindex="3" />' .
                '&nbsp;&nbsp;<label for="url">' . __( 'Website','atahualpa' ) . '</label></p>'

Make sure that you remove the , after the </p> to prevent any errors.

It needs to be added back to the array in comments.php if you want to reinstate the URL field on the comments form. If you do not have the Atahualpa theme installed, you will need to look for the default comments.php file in your WordPress folder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s