Remove Website URL Field from Blog Comments

Tried removing the Blog comments “Website URL” field using the following code in my child theme functions.php file:

add_filter('comment_form_default_fields', 'modify_comment_fields');
function modify_comment_fields($fields)
{
unset($fields['url']);
return $fields;
}

I got this text from the following support entry:

This seems to have no effect on the comments. The Website URL still exists.

Here’s the url to my blog:

Hi There,

Would you mind giving us credentials then so we can check your setup? You don’t seem to have cache so we need to see your setup. Please share credentials on a secure note.

Thanks. Here are my credentials.

Hi There,

That code is working perfectly on my end.

I’m not sure why it’s not working on your website.

I’ve added this custom CSS to remove the URL field under style.css

.comment-form-url {display: none !important;}

Regards!

1 Like

Thanks. The custom CSS approach worked to remove the website url from the comments form.

I’m trying to capitalize the comment form submit button. Is there a CSS fix for that? Tried the CSS below but didn’t work. Looks like there isn’t a class for the submit button in wp-commnets.php, just an ID.

.entry-comment-submit {text-transform: uppercase;}

Hi there,

It should be:

#entry-comment-submit {
     text-transform: uppercase;
}

Hope this helps.

1 Like

Thank you! Works great!

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.